This codelab introduces Identity Verification (IDV) concepts using the react-native-rdna-client plugin. You'll learn how the IDV SDK's challenge-response system works, understand different verification workflows, and master the terminology needed for implementing secure identity verification.
react-native-rdna-client plugin installed and configuredNSCameraUsageDescription), NFC permission (NFCReaderUsageDescription), Near Field Communication Tag Reading capabilityThe RELID IDV SDK implements Identity Verification through a challenge-response mechanism. This system ensures secure, step-by-step verification of user identity through document scanning, facial recognition, and biometric storage.
The IDV system works on a fundamental challenge-response pattern:
Identity verification can be triggered in multiple scenarios:
Activation Flow → Document Scan Challenge → IDV Flow Begins
Post-Login → Activated Customer KYC API → IDV Flow Begins
Post-Login → Additional Document Scan API → Document Capture Flow
The IDV system uses several categories of challenges:
Category | Purpose | Examples |
Document Verification | Capture and verify identity documents |
|
Document Confirmation | Verify extracted document details |
|
Selfie Capture | Capture user's facial biometric |
|
Facial Matching | Compare document photo with selfie |
|
Biometric Storage | Opt-in for biometric template storage |
|
The IDV system is completely event-driven:
The RELID IDV SDK supports multiple distinct verification workflows, each designed for specific use cases and user scenarios. These workflows range from initial onboarding with identity verification to post-login biometric management and step-up authentication.
Purpose: First-time user registration with identity verification
When Used:
Key Characteristics:
Typical Flow Sequence:
getIDVDocumentScanProcessStartConfirmation → Document capture initiatedgetIDVConfirmDocumentDetails → User confirms extracted datagetIDVSelfieProcessStartConfirmation → Selfie capture initiatedgetIDVSelfieConfirmation → User confirms facial match resultgetIDVBiometricOptInConsent → User opts in/out for biometric storageonUserLoggedIn → Activation complete with IDVFlow Outcome: User registered with verified identity and optional biometric template stored
Purpose: Complete KYC verification for already activated users
When Used:
Key Characteristics:
initiateActivatedCustomerKYC APITypical Flow Sequence:
initiateActivatedCustomerKYC(reason)getIDVDocumentScanProcessStartConfirmation → Document capturegetIDVConfirmDocumentDetails → Confirm extracted datagetIDVSelfieProcessStartConfirmation → Selfie capturegetIDVSelfieConfirmation → Confirm facial matchgetIDVBiometricOptInConsent → Biometric storage consentonIDVActivatedCustomerKYCResponse → KYC completion resultFlow Outcome: User's identity verified with optional biometric template storage
Purpose: Scan additional documents for existing users
When Used:
Key Characteristics:
initiateIDVAdditionalDocumentScan(reason)Typical Flow Sequence:
initiateIDVAdditionalDocumentScan(reason)getIDVDocumentScanProcessStartConfirmation → Document captureonIDVAdditionalDocumentScan → Document scan resultFlow Outcome: Additional document captured and verified
Purpose: Enable users to opt-in for biometric template storage after initial registration
When Used:
Key Characteristics:
initiateIDVBiometricOptIn() APITypical Flow Sequence:
initiateIDVBiometricOptIn()onIDVOptInCapturedFrameConfirmation → User confirms captured selfiesetIDVBiometricOptInConfirmation(status) with user decisiononIDVBiometricOptInStatus → Opt-in completion resultFlow Outcome: User's biometric template stored on server for future passwordless authentication
API Call Example:
// Initiate biometric opt-in
RdnaClient.initiateIDVBiometricOptIn((response) => {
// SDK handles authentication and selfie capture
});
// Confirm captured selfie
RdnaClient.setIDVBiometricOptInConfirmation(
RDNAIDVStatus.CONTINUE, // or CANCEL, RECAPTURE
(response) => {
// Handle response
}
);
Purpose: Allow users to delete their stored biometric template from the server
When Used:
Key Characteristics:
initiateIDVBiometricOptOut() APITypical Flow Sequence:
initiateIDVBiometricOptOut()onIDVBiometricOptOutStatus → Opt-out completion resultFlow Outcome: User's biometric template deleted from server
API Call Example:
// Initiate biometric opt-out
RdnaClient.initiateIDVBiometricOptOut((response) => {
// SDK handles authentication and template deletion
});
Important Notes:
Purpose: Authenticate users using their stored biometric template for step-up authentication
When Used:
Key Characteristics:
initiateIDVServerBiometricAuthentication(reason) APITypical Flow Sequence:
initiateIDVServerBiometricAuthentication(reason)onIDVServerBiometricAuthenticationResult → Authentication result with match scoreFlow Outcome: User authenticated via biometric matching; transaction/operation can proceed
API Call Example:
// Initiate server biometric authentication
RdnaClient.initiateIDVServerBiometricAuthentication(
"Verify identity for transaction", // reason
(response) => {
// Handle sync response
}
);
Response Data Structure:
The onIDVServerBiometricAuthenticationResult event provides:
Important Notes:
checkIDVUserBiometricTemplateStatus() APIPurpose: Perform enhanced authentication for sensitive operations
When Used:
Key Characteristics:
RDNA_IDV_POSTLOGIN_IDV_STEPUP_AUTH (Workflow #9)Typical Use Cases:
Flow Outcome: User authenticated at higher assurance level for sensitive operation
Purpose: Perform step-up authentication combined with cryptographic data signing
When Used:
Key Characteristics:
RDNA_IDV_POSTLOGIN_STEP_UP_AUTH_AND_SIGN_DATA (Workflow #16)RDNA_OP_STEP_UP_AUTH_AND_SIGN_DATA (Mode 12)Typical Use Cases:
Flow Outcome: User authenticated and transaction data cryptographically signed
Each IDV challenge follows a consistent event → API response pattern. Understanding these mappings is crucial for implementing verification flows.
Every challenge in the IDV system follows this pattern:
Plugin/SDK Challenge Event → App UI Interaction → API Response → Flow Continuation
Challenge Name |
|
Event Name |
|
API Name |
|
Purpose | Initiate document capture process |
When Triggered | Start of IDV workflow requiring document verification |
User Input | User consent to begin document scanning |
Flow Pattern:
Plugin/SDK → getIDVDocumentScanProcessStartConfirmation event → App shows info screen → User taps proceed → setIDVDocumentScanProcessStartConfirmation API → Document capture UI
Important Notes:
idvWorkflow parameter received in the eventAPI Call Example:
RdnaClient.setIDVDocumentScanProcessStartConfirmation(
true, // isConfirm: true to proceed, false to cancel
idvWorkflow, // Workflow enum from event
(response) => {
// Handle response
}
);
Challenge Name |
|
Event Name |
|
API Name |
|
Purpose | Verify extracted document data with user |
When Triggered | After successful document scan |
User Input | User confirmation of extracted OCR data |
Flow Pattern:
Document scan complete → getIDVConfirmDocumentDetails event → App displays extracted data → User confirms → setIDVConfirmDocumentDetails API → Next challenge
Response Data Structure: The event provides a JSON v3.0 object containing:
Important Notes:
false triggers document re-scan flowAPI Call Example:
RdnaClient.setIDVConfirmDocumentDetails(
true, // isConfirm: true to accept, false to rescan
challengeMode, // Challenge mode from event
(response) => {
// Handle response
}
);
Challenge Name |
|
Event Name |
|
API Name |
|
Purpose | Initiate selfie capture with liveness detection |
When Triggered | After document details confirmation |
User Input | User consent to capture selfie |
Flow Pattern:
Plugin/SDK → getIDVSelfieProcessStartConfirmation event → App shows info screen → User taps proceed → setIDVSelfieProcessStartConfirmation API → Selfie capture UI
Important Notes:
API Call Example:
RdnaClient.setIDVSelfieProcessStartConfirmation(
true, // isConfirm: true to proceed, false to cancel
false, // useDeviceBackCamera: false for front, true for back
idvWorkflow, // Workflow enum from event
(response) => {
// Handle response
}
);
Challenge Name |
|
Event Name |
|
API Name |
|
Purpose | Confirm facial matching result |
When Triggered | After selfie capture and server-side facial matching |
User Input | User decision based on match result |
Flow Pattern:
Selfie captured → Server facial matching → getIDVSelfieConfirmation event → App displays match result → User selects action → setIDVSelfieConfirmation API → Flow continues
Response Data Structure:
The event provides JSON containing:
Action Options:
"continue-flow": Proceed with workflow (typical for successful match)"reinit-idv-document-scan": Re-scan document"reinit-idv-selfie": Re-capture selfieImportant Notes:
API Call Example:
RdnaClient.setIDVSelfieConfirmation(
"continue-flow", // action: selected from action_buttons
challengeMode, // Challenge mode from event
(response) => {
// Handle response
}
);
Challenge Name |
|
Event Name |
|
API Name |
|
Purpose | Obtain user consent for biometric template storage |
When Triggered | After successful selfie matching (in KYC flows) |
User Input | User consent decision for biometric storage |
Flow Pattern:
Plugin/SDK → getIDVBiometricOptInConsent event → App shows consent screen → User decides → setIDVBiometricOptInConsent API → Biometric storage/skip
Important Notes:
initiateIDVBiometricOptOut APIAPI Call Example:
RdnaClient.setIDVBiometricOptInConsent(
true, // isOptIn: true to save template, false to skip
challengeMode, // Challenge mode from event
(response) => {
// Handle response
}
);
Understanding key IDV terminology is essential for implementing and troubleshooting identity verification flows.
The process of capturing and validating an identity document (passport, driver's license, national ID) using OCR and authenticity checks.
Example: Scanning a passport to extract name, date of birth, document number, and photo.
Technology that extracts text data from identity documents.
Example: Reading the MRZ (Machine Readable Zone) on a passport to extract structured data.
Reading the RFID chip embedded in electronic passports and enhanced identity documents.
Key Points:
Technology that ensures the selfie is captured from a live person, not a photo or video.
Key Points:
Comparing the photo from the identity document with the captured selfie to verify they are the same person.
Example: Match score of 0.95 indicates high confidence that document photo and selfie are the same person.
A security step that the Plugin/SDK requires the user to complete. Each challenge represents a specific verification requirement.
Example: The IDV-Document-Scan-Confirmation challenge requires the user to scan their identity document.
A callback sent by the Plugin/SDK to your application when a challenge needs to be addressed.
Example: The getIDVDocumentScanProcessStartConfirmation event indicates the Plugin/SDK needs user consent to begin document scanning.
The method your application calls to provide the required information for a challenge.
Example: Calling setIDVDocumentScanProcessStartConfirmation(true, workflow) responds to the document scan initiation challenge.
A complete sequence of challenges from start to successful verification.
Example: Activated Customer KYC workflow: Document scan → Confirm details → Selfie capture → Match confirmation → Biometric opt-in
An identifier indicating the current workflow context and authentication mode.
Key Points:
challengeMode parameterRDNA_IDV_API_BIOMETRIC_AND_DOCUMENT_SCAN, RDNA_IDV_API_AGENT_BIOMETRIC_AND_DOCUMENT_SCANRegulatory requirement to verify the identity of customers.
Key Points:
Mathematical representation of facial features stored securely on the server.
Key Points:
User consent to store their biometric template on the server for future authentication.
Process to delete a user's stored biometric template from the server.
Authentication method that compares a live selfie capture with the user's stored biometric template on the server.
Key Points:
Enhanced authentication process requiring additional verification beyond the initial login for sensitive operations.
Key Points:
Cryptographic operation that creates a verifiable digital signature of transaction data using user's credentials.
Key Points:
Operation to verify whether a user has a biometric template stored on the server.
Key Points:
checkIDVUserBiometricTemplateStatus()Validation of document security features to detect forgeries.
Examples:
Validation of captured image quality to ensure successful processing.
Examples:
Document recognition database containing information about valid identity documents worldwide.
Key Points:
getIDVDatabaseID and setIDVDatabaseID APIsonDatabaseDownloadProgress eventConfiguration settings for document scanning behavior.
Key Points:
getIDVConfig APIsetIDVConfig APIDetailed numeric error code providing specific information about what went wrong.
Generic error category for broad error classification.
Human-readable error message describing the issue and potential solutions.
Critical Timing Rules:
challengeMode or idvWorkflow received in eventsCorrect Flow:
getIDVDocumentScanProcessStartConfirmation event → setIDVDocumentScanProcessStartConfirmation API → wait for next event → getIDVConfirmDocumentDetails event → setIDVConfirmDocumentDetails API
Incorrect Flow:
setIDVDocumentScanProcessStartConfirmation API → getIDVDocumentScanProcessStartConfirmation event (❌ API called before event)
getIDVDocumentScanProcessStartConfirmation event → setIDVDocumentScanProcessStartConfirmation API → setIDVDocumentScanProcessStartConfirmation API (❌ duplicate API calls)
Congratulations! You've mastered the fundamentals of Identity Verification (IDV) with the RELID IDV SDK:
✅ Challenge-Response Architecture: Understanding how Plugin/SDK events map to API responses
✅ Workflow Types: 8 distinct workflows covering onboarding, KYC, biometric management, and step-up authentication
✅ Event Integration: Document scanning, confirmation, selfie capture, and biometric opt-in flows
✅ API Patterns: Proper response patterns and error handling
✅ IDV Terminology: Essential identity verification and technical concepts
✅ Best Practices: Timing, error handling, and implementation guidelines
You now understand:
With this foundation, you're ready for: