Add passkey sign-in to a React Native or Expo app
Our React Native SDK 0.1.4 adds passkey sign-in. Expo needs a development build. Authentication is free for the first 50,000 active users each month, then $0.02 per additional active user that month.

Contents
In this guide
Jump to the part you need.
We built @didit-protocol/auth-react-native 0.1.4 for teams adding passkey sign-in to a React Native or Expo app. It fits apps on React Native 0.77 with the New Architecture that want a passkey button beside our hosted sign-in page. Sign-in is free for the first 50,000 active users each month, then $0.02 per active user month. The caveat: Expo Go cannot load the native module, so you need a development build.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
| Item | What you get |
|---|---|
| Package | @didit-protocol/auth-react-native 0.1.4 on npm |
| Native modules | Authentication 4.15.4, resolved as me.didit:didit-auth on Android and the DiditSDK/Auth pod on iOS |
| React Native | 0.77 with the New Architecture |
| Android | API 24 minimum; passkeys need Android 9 or later |
| iOS | 15.0 minimum; the hosted pages need iOS 17.4 at run time |
| Expo | A development build. Expo Go cannot load the native module |
| Token storage | iOS Keychain or storage protected by the Android Keystore; refresh tokens never reach JavaScript |
| Passkey registration | registerPasskey() needs a session at most five minutes old |
| Price | First 50,000 active users each month free, then $0.02 per active user month |
Start free in the sandbox at business.didit.me, with no sales call. Every sandbox application has Authentication turned on from the start. If you want a coding assistant to read our documentation while you build, connect it through the Didit MCP server. Plans and every unit price are on didit.me/pricing.
What the package gives you
Our package opens your application's hosted Didit page, keeps the session in the iOS Keychain or the Android Keystore, and exposes a small API. One instance per application covers sign-in, passkey sign-in, passkey registration, re-authentication, session reads, tokens, sign-out and step-up.
import { createDiditAuth } from '@didit-protocol/auth-react-native';
// One instance per application. Use your sandbox key while you build.
const auth = createDiditAuth({
publishableKey: 'pk_test_...',
redirectUri: 'https://app.example.com/didit/callback',
});
// First use: hosted sign-up or sign-in, then enroll a passkey.
const session = await auth.signIn(); // hosted page: sign-up and sign-in
const passkeyId = await auth.registerPasskey(); // needs a session at most five minutes old
// Returning user who already has a passkey available on this device.
const returning = await auth.signInWithPasskey();
await auth.currentSession(); // DiditSession or null (cached for 30 seconds; { force: true } asks Didit now)
await auth.getToken(); // string or null: a five-minute JWT for your backend, renewed before it expires
await auth.signOut(); // signs out here at once, then ends the session at Didit when reachable
Two behaviours matter in production. The hosted sign-in is bound to its start with PKCE (S256) and a random state, so a redirect for any other sign-in is refused, and closing the page rejects with cancelled. Refresh tokens stay in the Keychain or the Keystore and never reach JavaScript.
signInWithPasskey() is the alternative to the hosted page when the person already has a passkey available on this device. registerPasskey() creates one, and the five-minute window means you call it right after sign-in, not from a settings screen opened an hour later. If the session is more than five minutes old, call reauthenticate() to sign the same person in again, then call registerPasskey() from the new session. Use { method: 'passkey' } only if a passkey is already available on the device.
Identity verification has its own package, @didit-protocol/sdk-react-native. Both can be installed in one app, because they pin the same native release 4.15.4. The React Native quickstart documents the SDK calls shown here, the canonical product page for the hosted sign-in pages is Didit Authentication, and the published per-unit prices sit on didit.me/pricing.

Prerequisites
| Requirement | Minimum or value | Where it lives |
|---|---|---|
| Didit plan | Any plan. The sandbox is free on every plan. The Free plan includes $10 in monthly credit for the first organization created with an eligible work email for a company domain. The credit does not cover phone verification codes | didit.me/pricing |
| Application | A Sandbox application, where Authentication is on from the start. A Live application turns it on from the Products page | Didit Business Console |
| Console access | Opening Authentication, Security and sessions, and Developers | Didit Business Console |
| Client | React Native 0.77 or later with the New Architecture. For Expo, use a development build | Your repository |
| Android | API 24 minimum; passkeys need Android 9 or later | Your Android build files |
| iOS | 15.0 minimum; the hosted pages need iOS 17.4 at run time | ios/Podfile |
| Key | Publishable key pk_test_... or pk_live_.... It is public, and no Didit secret belongs in the app | Authentication, Developers |
| Redirect | An HTTPS URI registered exactly as the app sends it. We accept no custom URL schemes | Authentication, Security and sessions |
| Sign-in method | passkey enabled with PUT methods/passkey/ and a body of {"enabled": true} | Authentication management API |
Seven steps to passkey sign-in in a development build
Turn on Authentication and the passkey method. A sandbox application has Authentication on from the start, so you can test straight away. A Live application turns it on from the Products page of the console. Then enable the method with
PUT methods/passkey/and a body of{"enabled": true}, using a console session, an owner-approved management grant or anauthentication-scoped API key. The passkey method has no additional method-specific fields in the Authentication management API. Complete the native redirect and passkey setup in step 5. The hosted page shows only the methods you enabled.Register the redirect URI and copy the publishable key. Add your HTTPS redirect under Authentication, Security and sessions and copy the publishable key from Authentication, Developers. We match the registered value exactly, so a mismatch fails the code exchange. Use HTTPS on a domain you control: a custom URL scheme will not work.
Install the package.
npm install @didit-protocol/auth-react-nativeConfigure the native dependencies and platform redirects before rebuilding the app.
Configure the native dependencies, then install pods where they apply. On Android nothing else is needed: the package adds our Maven repository for the
me.diditgroup only, and Gradle resolvesme.didit:didit-authfrom it. If yourandroid/settings.gradlesetsrepositoriesModetoPREFER_SETTINGS, which ignores repositories added by a build file, listhttps://raw.githubusercontent.com/didit-protocol/sdk-android/main/repositorythere as well. On iOS, CocoaPods is the default, so name the podspec at the pinned version inios/Podfile:pod 'DiditSDK/Auth', :podspec => 'https://raw.githubusercontent.com/didit-protocol/sdk-ios/4.15.4/DiditSDK.podspec'To resolve it with Swift Package Manager instead, set
$DiditSdkIosLinkage = 'spm'beforeuse_native_modules!and leave the pod line out. The package then adds theDiditAuthproduct ofsdk-ios. With the iOS dependencies configured, runcd ios && pod install.Complete the redirect and passkey setup on each platform. We return the person to your app with an HTTPS redirect, so the native side has to claim your domain before the first sign-in.
Android checklist: the HTTPS redirect registered in Authentication, Security and sessions, the App Link, the redirect activity and native passkeys. The Android redirect and passkeys section has the exact entries.
iOS checklist: the same registered HTTPS redirect, the associated domains and native passkeys. The iOS redirect and passkeys section has the exact entries.
Rebuild the app, sign in and register a passkey. Rebuild so the module and the platform configuration are both in the binary. An Expo project needs a development build at this point, because Expo Go cannot load the native module. Then create the instance once, call
signIn(), and callregisterPasskey()as soon as the session resolves, while it is at most five minutes old.currentSession()answers from a 30-second cache; pass{ force: true }when you need our live answer.Verify the token on your backend. Send the result of
getToken()as a Bearer token. On every protected request, your backend verifies the ES256 signature against the issuer's JWKS at<origin>/.well-known/jwks.json, theniss,aud,expandtyp: at+jwt. Reject a token whoseactis notnullunless the route accepts agent access. Use a server SDK or any JWT library. CallgetToken()right before each request: after a refresh the previous access token stops working atGET session/andDELETE session/. Client session flags control what the app displays; your backend checks the live session withGET session/before sensitive actions.
Before a payout, a new bank account or a change of email or phone, ask for a step-up and act only on an approved result your backend reads itself.
const result = await auth.stepUp({ action: 'payout', amount: '900.00', currency: 'EUR' });
if (result.approved) {
// Your backend confirms with GET step-up/{result.id}/ before it pays out.
}
Map the session fields and the errors
| Field | What it holds | Use it for |
|---|---|---|
userId | The person's Didit user id | Your own account record key |
sessionId | The current session | Support and audit lookups in the console |
applicationId | The application the session belongs to | Keeping sandbox and live data apart |
vendorData | The id that ties the person to their verifications and transactions | Joining sign-in to KYC and monitoring results |
email, emailVerified, phone | Contact details and whether the email is verified | Confirming which person is signed in |
methods | The methods this sign-in used | Telling a passkey sign-in from a password or email code sign-in |
mfaVerified, verified | Two flags the session carries | What the app displays, never what the backend allows |
organizations | The organizations the person belongs to | Choosing a workspace after sign-in |
expiresAt | When the session ends | Prompting reauthentication before it happens |
These fields drive the screens your app shows. They do not authorize anything on the server: the backend verifies the token and checks the live session before every sensitive action.
| Result | What it means | Fix |
|---|---|---|
cancelled | The person closed the hosted page | Keep them on your sign-in screen; no error copy is needed |
browser_unavailable | Below iOS 17.4, hosted sign-in and step-up that needs to open a check return browser_unavailable. Session, token and sign-out calls are unaffected | Raise the deployment target to iOS 17.4 or later, or keep those people on a path without hosted sign-in |
not_signed_in | reauthenticate was called without a session | Sign in first, then reauthenticate |
step_up_user_mismatch | A different person signed in during reauthenticate | The new session is ended and the current one stays; ask the original person again |
invalid_grant at the token exchange | The code is unknown, used or expired, the verifier or redirect does not match, the redirect is no longer registered, or the person is blocked | Check redirect and verifier consistency, restart sign-in for an expired or used code, and read the token docs for the other causes |
currentSession and getToken resolve with null | We ended the session: revoked, expired or a reused refresh token | Treat the person as signed out and send them to signIn |
Test in the sandbox before you go live
Build against a sandbox application the whole time. Its sign-in origin is https://<slug>.sandbox.auth.didit.me, its keys are separate from live keys, and its publishable key starts with pk_test_. Sandbox testing is free and unlimited, so run the flow as often as you need.
- Create the sandbox application, register the HTTPS redirect, and enable
passkey. - Run a development build on an Android 9 or later device, and on iOS 17.4 or later so the hosted page can return to your redirect.
- Sign in on the hosted page with a fresh session, then call
registerPasskey()within five minutes and confirm that the call returns a passkey ID. - Confirm that
registerPasskey()needs a fresh session after the five-minute window closes, then callreauthenticate()to sign the same person in again and retry from the new session. - Call
signOut(), thensignInWithPasskey(), and confirm you get a session with the sameuserId. - Confirm that your backend rejects an access token with an invalid signature. For a valid token, verify the ES256 signature against the sandbox issuer's JWKS, check
issagainst that issuer andaudagainst the sandbox application ID, require an unexpiredexpand atypheader ofat+jwt, and requireactto benullunless the route accepts agent access.
Expected success: currentSession() resolves with a session that carries userId, vendorData, methods and expiresAt; registerPasskey() resolves with a passkey ID; getToken() resolves with a five-minute JWT that your backend accepts. Every sign-in and failure also appears on the person's timeline in the console, next to their verifications and transactions, and you can subscribe to the auth.* webhooks if your backend reacts to sign-ups and sign-ins.
Check that your HTTPS redirect exactly matches the URI registered in the console. If the app does not receive the callback, check the Android App Link and redirect activity or the iOS associated domains against the platform quickstart. A test device below Android 9 will not offer a passkey at all, even though the module itself supports API 24.

Disconnect the integration
auth.signOut() signs the person out on the device at once, then ends the session at Didit when the device can reach it. After that, currentSession and getToken resolve with null, so your app reads the person as signed out.
To remove the integration from the project, delete the pod 'DiditSDK/Auth' line from ios/Podfile and run cd ios && pod install, remove @didit-protocol/auth-react-native from your dependencies, and remove the App Links and associated domains entries you added. On the Didit side, delete the redirect URI under Authentication, Security and sessions so no stale callback stays registered, and sign people out from the console if you are retiring the application.
Cost of both ends
What Didit charges
- Authentication: the first 50,000 active users each month are free, then $0.02 per additional active user for that month.
- Identity verification in the same app: billed separately at $0.33 per completed full ID check, made up of ID document $0.15, passive liveness $0.10, face match $0.05 and device and IP analysis $0.03.
What your team spends
Budget engineering time for native builds and redirect setup on the platforms you support. Test Android passkeys on Android 9 or later and the iOS hosted sign-in flow on iOS 17.4 or later. The sandbox costs nothing while you build.
Worked example
An app with 80,000 active users in a month, of whom 12,000 also complete a full ID check:
- Authentication inside the free allowance: 50,000 active users x $0.00 = $0.00
- Authentication above it: 80,000 - 50,000 = 30,000 active users x $0.02 = $600.00
- Full ID checks, billed separately: 12,000 x $0.33 = $3,960.00
- Total for the month at list price: $600.00 + $3,960.00 = $4,560.00
For 80,000 monthly active users, Authentication costs $600.00 at list price, and the optional ID checks add $3,960.00. Growth applies 4% off Didit prices and Scale 10%, and their monthly credit is applied to usage first. The figures above are list price with no credit applied. See didit.me/pricing for the current plan terms and the cost estimator.
Sources
- Didit docs: React Native quickstart
- Didit docs: Android quickstart, set up the redirect and passkeys
- Didit docs: iOS quickstart, set up the redirect and passkeys
- Didit docs: Authentication overview
- Didit Authentication product page, the canonical product reference for the hosted sign-in pages
- Didit docs: Sign-in methods
- Didit docs: Authentication integration guide
- Didit docs: Tokens and JWKS
- Didit docs: Set up Authentication by API
- Didit docs: Server SDKs overview
- Didit docs: Native mobile SDKs overview
- Didit docs: React Native verification SDK
- Didit pricing and pricing as JSON, read November 26, 2026
- Didit docs: pricing and billing rules
- Didit MCP server
Start with a sandbox application at business.didit.me. Open Authentication, register your HTTPS redirect, enable the passkey method, and run a development build of your app against it. No sales call is needed to test passkeys end to end.
Try it
Try this in the sandbox
Run the check this guide describes, free.
The product this post is about, taken from its topic. Run it free in the sandbox.
Author
Alberto Rosas
Co-founder and CEO

Questions
Frequently asked questions
Can I use Didit passkeys in Expo Go?
No. Expo Go cannot load the native Authentication module, so passkey sign-in needs a development build of your app. Follow the Android Maven or iOS CocoaPods or Swift Package Manager setup for your target platform. Configure Android App Links and the redirect activity or iOS associated domains, then rebuild the app.
What are the minimum versions for React Native, Android and iOS?
React Native 0.77 with the New Architecture, Android API 24 and iOS 15.0. Passkeys themselves need Android 9 or later, and the hosted pages need iOS 17.4 at run time. Below iOS 17.4, hosted sign-in and step-up that needs to open a check return browser_unavailable, while session, token and sign-out calls keep working.
How long do I have to register a passkey after signing in?
registerPasskey() needs a session that is at most five minutes old. Call it right after signIn() or signInWithPasskey() resolves. If the session is more than five minutes old, call reauthenticate() to sign the same person in again, then call registerPasskey() from the new session. Use { method: 'passkey' } only if a passkey is already available on the device.
Where are refresh tokens stored in a React Native app?
In the iOS Keychain or storage protected by the Android Keystore, depending on the platform. Refresh tokens never reach JavaScript. getToken() returns a five-minute access JWT or null, and the refresh token stays in protected native storage.
How much does passkey sign-in cost?
Sign-in is billed as Authentication usage: the first 50,000 active users each month are free, then $0.02 per additional active user for that month. If the same app also runs identity verification, those checks are billed separately at $0.33 per completed full ID check.
Do I need a custom URL scheme for the redirect?
No, and it will not work. We return the person to your app with an HTTPS redirect and accept no custom URL schemes. On Android that means an App Link with the redirect activity, and on iOS that means associated domains, both set up before the first sign-in.
How do I tell whether someone signed in with a passkey?
Read the methods field on the DiditSession. It lists the methods that sign-in used, so you can separate a passkey sign-in from a password, an email code or a social provider. currentSession() answers from a 30-second cache, so pass { force: true } when you need our live answer.
What happens when a session is revoked or expires?
A session we ended, whether revoked, expired or caught reusing a refresh token, reads as signed out: currentSession and getToken resolve with null. Treat that as a sign-out and send the person back to signIn. Your backend should also check GET session/ before sensitive actions rather than trusting an unexpired token.
Can the identity verification SDK and the auth package live in the same app?
Yes. @didit-protocol/auth-react-native and @didit-protocol/sdk-react-native pin the same native release 4.15.4, so one app can sign people in and verify them. Passkey sign-in and identity verification are billed separately.
What happens if a different person signs in during reauthentication?
reauthenticate() rejects with step_up_user_mismatch. We end that new session and keep the current one, so you can ask the original person to try again without losing their session.
Does the Android API 24 minimum mean passkeys work on Android 7?
No. The native module installs and runs from API 24, but passkeys need Android 9 or later. Test passkeys on a device at that level, and treat the older range as a sign-in path without passkeys.
Compliance built in
Audited, certified and attested.
We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center
- Regulation encoded into your flows
Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.
- Ready for AMLR
Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.
- Tested in Spain's Treasury sandbox
Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.
- Audited, not self-declared
iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.
Your obligations · 3 regions
SOC 2 Type 2
ISO 27001
iBeta Level 1 and Level 2
EU regulator attestation
FSM youth protection
GDPR
EBA remote onboarding
MiCA compatible
FIDO Alliance member
- AMLREU AML Regulation ready
Integration · Didit MCP
Run Didit from your own AI agent
Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.
- Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
- Run investigationsAsk why a session was declined, review cases, search people and companies.
- Change rulesCreate payment rules, test them on past data and switch them on.
- Pull reportsAsk for numbers, exports or the audit log.
Didit Academy


