crossplatform-react-vidvauth
v1.0.0
Published
React Native bridge for legacy VIDV Auth SDK 2.3.x (Valify token + Digital Identity)
Maintainers
Readme
crossplatform-react-vidvauth
React Native bridge for the legacy VIDV Auth SDK 2.3.x — aligned with the Flutter plugin crossplatform_flutter_vidvauth branch development_v2.
Version: 1.0.0 (legacy Valify token + Digital Identity line; for Auth SDK 3.x / OIDC use the development / 1.0.0-kyx branch).
Features
- Turbo Module bridge for Android and iOS
- Same
startAuthargument map and JSON response envelope as Flutterdevelopment_v2 - Bundled example app with legacy demo UI (Valify OAuth token + auth modes)
- Native SDK: Android
vidvauthsdk 2.3.0, iOSVIDVAuth ~> 2.3.0
Installation
npm install [email protected]Follow docs/INTEGRATOR_GUIDE.md for Android manifest entries, Maven repos, and host-app setup.
Usage
import { VIDVAuth } from 'crossplatform-react-vidvauth';
const auth = new VIDVAuth();
const raw = await auth.start({
base_url: 'https://digitalidentity.valifystage.com',
bundle_key: 'YOUR_DI_BUNDLE_KEY',
language: 'en',
user_reference_id: 'UFID-123',
auth_mode: 'login',
phone: '+201234567890',
valify_access_token: 'YOUR_VALIFY_ACCESS_TOKEN',
valify_base_url: 'https://qa.valifystage.com',
valify_bundle_key: 'YOUR_VALIFY_BUNDLE_KEY',
document_type: 'egyNid',
});
const envelope = JSON.parse(raw);
// envelope.state => SUCCESS | ERROR | FAILURE | EXIT | NEXT_ACTIONSee docs/RESPONSE_HANDLING.md for the full response contract.
Run the local example
The example lives in example/ and mirrors the Flutter legacy demo (development_v2).
# Install (from repo root)
npm install
# Terminal 1 — Metro
npm run example:start
# Terminal 2 — Android
npm run example:android
# Terminal 2 — iOS (macOS)
cd example && bundle exec pod install --project-directory=ios && cd ..
npm run example:iosOr with npx from the example/ folder:
cd example
npx react-native start # terminal 1
npx react-native run-android # terminal 2Full step-by-step guide: docs/RUN_GUIDE.md
Project layout
crossplatform-react-vidvauth/
├── src/ # JS/TS API (VIDVAuth)
├── android/ # Kotlin Turbo Module + VIDV SDK 2.3.x
├── ios/ # Swift helper + ObjC++ Turbo Module
├── example/ # Local demo app (Legacy Auth Demo UI)
└── docs/ # Integrator + run guidesContributing
License
MIT
