Skip to main content

React Native SDK

Didit React Native SDK for identity verification

Native iOS and Android screens from one TypeScript call. Works with Expo and the React Native CLI.

$npm install @didit-protocol/sdk-react-native

Install

Install

Use Expo with the config plugin, or npm.

What the Expo plugin sets up

AndroidThe Didit Maven repository, the NFC setting and the packaging rules.
iOSThe DiditSDK pod, pinned to iOS 15 while NFC is on.
Not includedThe Info.plist keys. Add the camera, microphone, photo library and NFC keys under ios.infoPlist.
It does not run in Expo Go. The SDK uses native camera and NFC modules. Use a development build, or run npx expo prebuild.
npx expo install @didit-protocol/sdk-react-native# app.json{  "expo": {    "plugins": ["@didit-protocol/sdk-react-native"]  }}

Start

Start a verification

Pass the session token from your server and handle three results.

Three results

completedThe user finished. Read result.session.status.
cancelledThe user closed the flow.
failedSomething went wrong. Show result.error.message.

startVerification returns a promise. The SDK returns the status only. The full decision reaches your server by webhook.

TSX
import {  startVerification,  VerificationStatus,} from '@didit-protocol/sdk-react-native';// Start verification with a session token from your backendconst result = await startVerification('your-session-token');switch (result.type) {  case 'completed':    if (result.session.status === VerificationStatus.Approved) {      console.log('Identity verified!');    }    break;  case 'cancelled':    console.log('User cancelled');    break;  case 'failed':    console.log('Error:', result.error.message);    break;}

Requirements

What you need

Six things to check before you ship.

React Native 0.76 and laterNew Architecture only. Node.js 20 and TypeScript 5. Latest SDK version 4.15.4.
iOS 13.0 and laterNFC chip reading needs iOS 15.0.
Android 7.0 and laterThat is API 24, with Kotlin 1.9 and Java 17.
An Expo development buildThe config plugin sets up both platforms. Expo Go is not supported.
NFC is on by defaultNFC means reading the chip in a passport or ID card with the phone. Turn it off in the plugin options for a smaller app.
54 languagesThe SDK uses the device language, with English as the fallback.

Questions

Questions about the React Native SDK

Does the React Native SDK work with Expo?
Yes, through a config plugin. Add the package to the plugins list in app.json. You need a development build. It does not run in Expo Go.
Which React Native versions are supported?
React Native 0.76 and later, on the New Architecture. It runs on iOS 13.0 and later and on Android API 24 and later.
Does my API key go in the app?
No. The key stays on your server. Your server creates the session and the app only gets the session token.
Does the SDK read NFC chips?
Yes. NFC is on by default. On iOS it needs iOS 15.0. You can turn it off in the plugin options for a smaller app.
How do I install the React Native SDK without Expo?
Run npm install @didit-protocol/sdk-react-native, then add the DiditSDK pod to your ios/Podfile with the podspec URL, because it is not on CocoaPods trunk, and run bundle exec pod install. The podspec tag must match the native iOS version the package pins; 4.15.4 pins native 4.15.4. Never point it at main. You need Node.js 20 and TypeScript 5 or later.
Do I need to change Gradle for the React Native SDK on Android?
From 4.15.2, no: the package adds Didit's Maven repository for the me.didit group itself. On 4.15.1, add it to every project in android/build.gradle, or the build fails with Could not find me.didit:didit-sdk. To build without NFC, add diditSdkAndroidNfcEnabled=false to android/gradle.properties.
Does the Expo config plugin set the iOS permissions?
No. The Didit config plugin configures Gradle and the Podfile but does not edit Info.plist. Add NSCameraUsageDescription, NSMicrophoneUsageDescription, NSPhotoLibraryUsageDescription and NSLocationWhenInUseUsageDescription under ios.infoPlist in app.json, plus NFCReaderUsageDescription and the ISO7816 select identifiers for NFC. A missing required key makes iOS terminate the app.
How do I read the React Native SDK result?
startVerification and startVerificationWithWorkflow return a Promise<VerificationResult>. Check result.type: completed, with session.status Approved, Pending or Declined, cancelled, or failed. Errors are sessionExpired, networkError, cameraAccessDenied, notInitialized (Android only), apiError and unknown. Treat the webhook your backend receives as the final decision.
Can I prefill user details without a backend?
Yes. startVerificationWithWorkflow, where the SDK creates the session from your workflow ID, accepts vendorData, contactDetails (email, phone, notification emails), expectedDetails for cross-validation with the document, such as firstName and dateOfBirth, and metadata as a JSON string. For production, the session token method lets your backend create the session instead.
Which React Native SDK version supports biometric consent?
A React Native SDK release that pins native iOS and Android 4.10.0 or later shows the biometric consent step Didit asks for, before the first face capture, for people covered by Illinois, Texas or Colorado law. Earlier versions report the consent as not collected with the reason BIOMETRIC_CONSENT_UNSUPPORTED_SDK.
Can I test the React Native SDK without real users or charges?
Yes. Run sessions under a Didit sandbox application. Sandbox sessions are never billed, every external provider is mocked, and the outcome comes from the scenario or magic value you choose, not from the captured images. Active liveness still runs the real capture, including through the native SDKs' web handoff, and webhooks carry "environment": "sandbox".

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.

  • Trusted by EU regulators

    After a year of supervised testing, EU financial regulators confirmed that verifying with Didit is safer than checking an ID in person.

  • Audited, not self-declared

    iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.

Compliance assistant

Your obligations · 3 regions

EU · AMLRCustomer due diligence, human reviewCovered
Illinois, Texas, ColoradoExplicit biometric consentCovered
Germany · Youth protectionVerified adults only (JMStV)Covered
Workflow checked. Every obligation is met
  • 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.

Add to ClaudeChatGPT
Didit Academy · Lesson 04 · Use Didit with MCP
  • 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.

Start

Install the SDK

Create an account, get your sandbox key and install the package.

Create accountRead the docs

Free sandbox. Credit applies to work-email sign-ups.