signInWithPasskey() works the same on React Native as it does on the web, but passkeys are bound to a domain, so mobile apps need extra native setup before the OS will create or use them. You must associate your app with a domain you control and point the Dynamic client at that same domain with metadata.universalLink.
Complete React Native Setup first — this page only covers the passkey-specific native configuration. Passkey usage (
signInWithPasskey(), registration) is documented on Authenticate with Passkey and is identical across platforms.Prerequisites
Before you start, make sure you have:- A React Native app with the JavaScript SDK integrated (see Expo or Bare React Native).
- A domain you control, to host the required
.well-knownendpoints. This is the value you set asmetadata.universalLink. - iOS: an Apple Developer account, your Team ID, and your app’s bundle identifier.
- Android: your app’s package name and the SHA-256 fingerprint of your signing certificate.
Install the passkey package
If you have not already installed it during setup, addreact-native-passkey.
- Expo
- Bare React Native
Point the client at your domain
Setmetadata.universalLink to the domain that will host the .well-known endpoints. This is the origin passkeys are associated with, so it must match exactly.
dynamicClient.ts
Configure iOS
Host an Apple App Site Association (AASA) file athttps://yourdomain.com/.well-known/apple-app-site-association. It must be served as JSON (no .json extension) over HTTPS. Passkeys use the webcredentials key; keep the empty applinks block too — Apple can silently ignore the file if it’s absent. Replace TEAMID with your Apple Team ID and com.example.myapp with your bundle identifier:
apple-app-site-association
Live example
Live example
Dynamic’s demo app serves a working file at
demo.dynamic.xyz/.well-known/apple-app-site-association (abridged to the demo app):apple-app-site-association
- Expo
- Bare React Native
Add the domain to
app.json and rebuild the native app:app.json
Validate your AASA file with the Branch AASA Validator before testing on device — Apple caches it, so misconfigurations are easy to miss.
Configure Android
Host a Digital Asset Links file athttps://yourdomain.com/.well-known/assetlinks.json. Replace com.example.myapp with your package name and SHA_HEX_VALUE with the SHA-256 fingerprint(s) of your signing certificate:
assetlinks.json
Live example
Live example
Dynamic’s demo app serves a working file at
demo.dynamic.xyz/.well-known/assetlinks.json (abridged to the demo app):assetlinks.json
Sign in with a passkey
Once the associations resolve, passkeys behave exactly as on the web — callsignInWithPasskey() (or useSignInWithPasskey() in React). See Authenticate with Passkey.