@wyasolutions/react-native-wya-verify-sdk
v1.0.5
Published
WYA Verify provides KYC + Proof of Person via digital onboarding and face recognition.
Maintainers
Readme
React Native WYA Verify SDK
WYA Verify provides KYC + Proof of Person via digital onboarding and face recognition.
Installation
npm install @wyasolutions/react-native-wya-verify-sdkUsage
Integration Flows
Onboarding
sequenceDiagram
autonumber
actor App as Integrator App
participant RN as React Native SDK
participant Native as Native Bridge (iOS/Android)
participant WYA as WYA Verify SDK
participant Backend as Integrator Backend
App->>RN: startOnboarding({publicKey, idType, environment?})
RN->>Native: startOnboarding({publicKey, mode, idType})
Native->>WYA: launch onboarding
WYA-->>Native: result (raw)
Native-->>RN: resolve(result)
RN-->>App: WyaOnboardingResult {verified, raw}Face Match
sequenceDiagram
autonumber
actor App as Integrator App
participant RN as React Native SDK
participant Native as Native Bridge (iOS/Android)
participant WYA as WYA Verify SDK
participant Backend as Integrator Backend
App->>Backend: /init (request operationId)
Backend-->>App: operationId
App->>RN: startFaceMatch({publicKey, operationId, environment?})
RN->>Native: startFaceRecognition({publicKey, mode, faceOperation: MATCH})
Native->>WYA: launch face match
WYA-->>Native: result {operationId, status, decision}
Native-->>RN: resolve(result)
RN-->>App: WyaFaceMatchResult {verified, raw}Face Enroll
sequenceDiagram
autonumber
actor App as Integrator App
participant RN as React Native SDK
participant Native as Native Bridge (iOS/Android)
participant WYA as WYA Verify SDK
participant Backend as Integrator Backend
App->>Backend: /init (request operationId)
Backend-->>App: operationId
App->>RN: startFaceEnroll({publicKey, operationId, environment?})
RN->>Native: startFaceEnroll({publicKey, mode, faceOperation: ENROLL})
Native->>WYA: launch face enroll
WYA-->>Native: result {operationId, status, decision}
Native-->>RN: resolve(result)
RN-->>App: WyaFaceEnrollResult {enrolled, raw}Onboarding
import { startOnboarding } from '@wyasolutions/react-native-wya-verify-sdk';
const result = await startOnboarding({
publicKey: '<public-key>',
environment: 'SANDBOX',
idType: 'ARG_3',
operationId: '<operation-id>',
nonce: '<nonce>',
});
// JWT is available inside result.raw.Face Match (Verify)
import { startFaceMatch } from '@wyasolutions/react-native-wya-verify-sdk';
const result = await startFaceMatch({
publicKey: '<public-key>',
environment: 'SANDBOX',
operationId: '<operation-id>',
nonce: '<nonce>',
});
// result.verified indicates whether the face matched.
// result.raw includes operationId, status, and decision from the native SDK.Face Enroll (Registration)
import { startFaceEnroll } from '@wyasolutions/react-native-wya-verify-sdk';
const result = await startFaceEnroll({
publicKey: '<public-key>',
environment: 'SANDBOX',
operationId: '<operation-id>',
nonce: '<nonce>',
});
// result.enrolled indicates whether the enrollment completed.API
startOnboarding(params): Promise<WyaOnboardingResult>
startFaceMatch(params): Promise<WyaFaceMatchResult>
startFaceEnroll(params): Promise<WyaFaceEnrollResult>
isAvailable(): Promise<boolean>
getVersion(): Promise<{ wrapper: string; android?: string; ios?: string }>Parameters
OnboardingParamspublicKey: stringidType: stringenvironment?:'SANDBOX' | 'PROD' | 'DEVELOPMENT'(default:PROD)operationId?: stringnonce?: string
FaceMatchParamspublicKey: stringenvironment?:'SANDBOX' | 'PROD' | 'DEVELOPMENT'(default:PROD)operationId: stringnonce: string
FaceEnrollParamspublicKey: stringenvironment?:'SANDBOX' | 'PROD' | 'DEVELOPMENT'(default:PROD)operationId: stringnonce: string
Return Values
WyaOnboardingResultverified: booleanraw?: json object
WyaFaceMatchResultverified: booleanraw?: json object
WyaFaceEnrollResultenrolled: booleanraw?: json object
Errors
Errors are thrown as WyaError with:
code:E_INVALID_PARAMSE_CANCELLEDE_NATIVE_FAILUREE_ACTIVITY_MISSINGE_UNSUPPORTED_PLATFORM
messagedetails?
React Native Compatibility
- Supported React Native versions: 0.71.x to 0.83.x.
Security
- Do not commit public keys, JWTs, or other secrets to source control.
- Avoid logging biometric data or JWT payloads.
- Store credentials securely and pass them at runtime.
