Documentation Index
Fetch the complete documentation index at: https://docs.chipipay.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
On mobile, passkeys work differently from browsers. Instead of WebAuthn, the Chipi Expo SDK uses:expo-local-authentication— Face ID, Touch ID, and fingerprint gateexpo-secure-store— iOS Keychain / Android Keystore for protected key storage
usePasskey: true, the SDK generates a random encryption key, stores it in the device’s secure enclave, and gates it behind biometric authentication.
This is a native mobile implementation. For browser (Next.js / React), see
Use Passkeys (React) which uses WebAuthn instead.
Prerequisites
- Expo SDK 55 or later
- A physical iOS or Android device with biometrics enrolled (Face ID, Touch ID, or fingerprint)
- A development build — biometrics are not supported in Expo Go
Installation
Configuration
Add theexpo-local-authentication plugin to your app.json to request Face ID permission on iOS:
app.json, rebuild your development client:
Usage
Create a wallet with biometric passkey + PIN backup
PassusePasskey: true, an externalUserId, and the user’s PIN as
encryptKey. The SDK uses the biometric-derived key as the primary
encryption key and stores a second copy of the private key encrypted with the
PIN as a recovery fallback.
Sign a transaction (retrieve the key with biometrics)
When you need the encryption key later (e.g. to sign a transfer), retrieve it from secure storage — this automatically triggers the Face ID / Touch ID prompt:Use usePasskey: true directly in transaction hooks
useTransfer, useApprove, and useCallAnyContract now use the Expo native
passkey adapter automatically when wrapped with @chipi-stack/chipi-expo’s
ChipiProvider.
When you pass usePasskey: true to those hooks, also pass
externalUserId (usually your auth provider user id), so the SDK can fetch
the correct key from secure storage:
Migrate an existing PIN wallet to biometrics
If your users already have a PIN-based wallet, migrate them with one call:Full Example
- Create Wallet
- Transfer with Biometrics
How it Works
| Step | What happens |
|---|---|
| Wallet creation | SDK generates a random 32-byte key, prompts Face ID / Touch ID, stores key in iOS Keychain / Android Keystore with biometric protection |
| Wallet use | getNativeWalletEncryptKey(userId) retrieves the key — this automatically triggers the biometric prompt |
| Migration | Old PIN decrypts the private key, new biometric key re-encrypts it |
Security Notes
- The encryption key is stored in the device’s secure enclave (iOS Keychain / Android Keystore)
requireAuthentication: truemeans the key cannot be read without biometric approval- The key never leaves the device
- If the user uninstalls the app or re-installs it, the key is lost — ensure your users understand wallet recovery options
Utilities Reference
| Export | Description |
|---|---|
isNativeBiometricSupported() | Check if the device has enrolled biometrics |
createNativeWalletPasskey(userId, userName) | Manually create a passkey (called by useCreateWallet internally) |
getNativeWalletEncryptKey(userId) | Retrieve the stored key (triggers biometric prompt) |
hasNativeWalletPasskey() | Check if a passkey was already created on this device |
removeNativeWalletPasskey(userId) | Delete the stored key (destructive — use with caution) |
getNativeWalletCredential() | Get credential metadata (credentialId, userId, createdAt) |
Related
- Use Biometrics as a PIN — Manual approach storing your own PIN with biometric protection
- useCreateWallet
- useMigrateWalletToPasskey
