Skip to main content
This recipe integrates @glideco/ows-react-native into an Expo-managed React Native app. You will configure iOS Secure Enclave and Android StrongBox key generation, bind the resulting public key to an agent identity, and sign a payload that the MCP gateway verifies on-chain. Audience: mobile engineers building a React Native app that participates in the Glide agent identity system.

Prerequisites

  • Expo SDK 52 + React Native 0.76.
  • Xcode 16 (for iOS Secure Enclave access).
  • Android Studio Ladybug (for StrongBox API 28+).
  • Node 22+ and pnpm.
  • Glide running locally per the main quickstart.

Steps

1. Clone the example

2. Install the package in your own app

If you’re wiring this into an existing app rather than running the example:
The package ships pre-built native modules — no additional pod install or Gradle sync is needed beyond Expo’s normal prebuild.

3. iOS Secure Enclave setup

Add the com.apple.security.access-group entitlement in your app.json or app.config.ts:
The native module uses kSecAttrTokenIDSecureEnclave when generating keys on devices with an A7 chip or later. On the iOS Simulator it falls back to software-backed keys automatically — tests pass but keys are not hardware-protected.

4. Android StrongBox setup

Add the permission to AndroidManifest.xml via app.json:
The native module requests setIsStrongBoxBacked(true) when generating keys. On devices without StrongBox (Pixel 3 and earlier, most emulators), it falls back to TEE-backed keys. The keyInfo.isInsideSecureHardware field in the key metadata tells you which was used at runtime.

5. Generate a key pair

6. Bind the public key to an agent identity

Send the publicKeyDer to the Glide MCP gateway to register it as the agent’s signing key:

7. Sign a payload

8. Verify in the MCP gateway

The signed payload + base64 signature go into the Authorization header as a custom scheme, or into the JSON-RPC auth envelope. The gateway resolves the agentId → registered public key → verifies the ECDSA signature before processing the tool call.

Run it

Expected output in Metro console:

Extend it

  • Add key rotation — generate a new key pair and call agent-identity.rotate to replace the registered public key.
  • Handle OWSKeychain.errors.BIOMETRY_CHANGED by prompting the user to re-authenticate and re-register.
  • Store the keyHandle in Expo SecureStore so it survives app restarts.
  • Build a React Native Storybook story for the biometric prompt to test on both platforms.

Source

github.com/darshanbathija/axtior-neobank/tree/main/examples/embed-ows-react-native

Reading list