Native prerequisites (required)
AnrpId is a domain claim, and the OS honors it only if the domain claims your app back. This is
platform configuration, not Avok configuration; a passkey call fails at the OS layer without it.
- iOS: add the
webcredentials:<your-rpId>entitlement (Associated Domains) and serve/.well-known/apple-app-site-associationfrom that domain with your app’s identifier. - Android: serve
/.well-known/assetlinks.jsonfrom that domain with your package name and signing-certificate fingerprint (Digital Asset Links).
app.json associatedDomains and the Android
intent-filter setup); you cannot set them from JavaScript. The rpId you pass must be that same
domain.
Own-origin
Inject the passkey module and use SecureStore for non-secret state:Shared-origin
Shared-origin runs the ceremony in an in-app browser tab and brings back only the result. UsecreateNativeSharedOrigin, providing an openAuthSession that matches expo-web-browser’s
openAuthSessionAsync:
connect() verifies a signature over a caller nonce before trusting the
account. Keep returned payloads to a few kilobytes. Android’s Binder buffer is shared
process-wide.
Device pairing
usePairingCeremony runs the pairing phase machine over an injected transport (transport is
required on React Native, which ships no camera view). createExpoCameraTransport bridges
expo-camera:
transport.currentCode and feed scanned barcodes with transport.feedBarcode. See
Enroll a device.