Biometric Opt In
π Step-by-Step Workflow
1. π Check if Biometric Template Already Exists
API: checkIDVUserBiometricTemplateStatus
- API to check if the biometric template exists.
- Event Triggered: onIDVCheckUserBiometricTemplateStatus
-
Parses idvResponse to check:
result: false β no template β initiate opt-in flow
result: true β template exists β optionally offer opt-out
-
2. π Initiate Biometric Opt-In
API: initiateIDVBiometricOptIn()
- Starts the opt-in workflow.
- SDK decides the authentication type and challengeMode (typically 8).
3. π Request Password if Needed
Event: getPassword
- Triggered if password re-authentication is required.
- App collects password and submits it using
setPassword
.
4. πΈ Selfie Capture Preparation
Event: getIDVSelfieProcessStartConfirmation
- SDK asks the app to confirm that the user is ready for selfie capture.
- App should display a screen with instructions.
5. β
Confirm and Start Selfie Capture
API: setIDVSelfieProcessStartConfirmation(true, useBackCamera, workflow)
- Called after user taps "Start".
- SDK launches the camera and captures a selfie.
6. πΌοΈ Preview Captured Frame
Event: onIDVOptInCapturedFrameConfirmation
- SDK provides the app a preview of the captured frame.
- App displays this image and asks user to confirm or retake.
7. π User Confirms or Rejects Captured Frame
API: setIDVBiometricOptInConfirmation(true/false, workflow, challengeMode)
true
β SDK proceeds to register biometricfalse
β SDK restarts the selfie capture process
8. β
Final Status of Opt-In
Event: onIDVBiometricOptInStatus
- SDK confirms whether biometric template was stored successfully.
- App can show success/failure message based on the payload.
π Summary of Events and APIs
Step | SDK Element | Description |
---|---|---|
1 | onIDVCheckUserBiometricTemplateStatus | Check existing template |
2 | initiateIDVBiometricOptIn() | Starts opt-in process |
3 | getPassword | (if required) ask user for password |
4 | getIDVSelfieProcessStartConfirmation | Prepare user for selfie |
5 | setIDVSelfieProcessStartConfirmation() | Launch selfie capture |
6 | onIDVOptInCapturedFrameConfirmation | Preview image to user |
7 | setIDVBiometricOptInConfirmation() | User confirms image |
8 | onIDVBiometricOptInStatus | Template registration status |
π§· Sample Developer Flow
// Pseudocode
if (!biometricTemplateExists) {
initiateIDVBiometricOptIn(); // triggers auth + selfie
onIDVOptInCapturedFrameConfirmation -> show selfie
setIDVBiometricOptInConfirmation(RDNA_IDV_SELFIE_APPROVED)
onIDVBiometricOptInStatus -> proceed or show error
}
Workflow
flowchart TD userLogsIn[User Logs In] onUserLoggedIn[SDK triggers onUserLoggedIn] checkIDVUserBiometricTemplateStatus[App calls checkIDVUserBiometricTemplateStatus] onIDVCheckUserBiometricTemplateStatus[SDK triggers onIDVCheckUserBiometricTemplateStatus] showOptIn[App shows Biometric Opt In option] initiateIDVBiometricOptIn[App calls initiateIDVBiometricOptIn] ldaOrPassword[SDK triggers LDA Prompt of getPassword] provideLdaOrPassword[Provide LDA or setPassword] getIDVSelfieProcessStartConfirmation[SDK triggers getIDVSelfieProcessStartConfirmation] setIDVSelfieProcessStartConfirmation[App calls setIDVSelfieProcessStartConfirmation] showSelfieScreen[SDK initiates Selfie Capture] onIDVOptInCapturedFrameConfirmation[SDK triggers onIDVOptInCapturedFrameConfirmation] setIDVBiometricOptInConfirmation[App calls setIDVBiometricOptInConfirmation] onIDVBiometricOptInStatus[SDK triggers onIDVBiometricOptInStatus] userLogsIn --> onUserLoggedIn onUserLoggedIn --User goes to settings --> checkIDVUserBiometricTemplateStatus checkIDVUserBiometricTemplateStatus --> onIDVCheckUserBiometricTemplateStatus onIDVCheckUserBiometricTemplateStatus -- template not present --> showOptIn showOptIn -- User chooses to Opt In --> initiateIDVBiometricOptIn initiateIDVBiometricOptIn --> ldaOrPassword ldaOrPassword --> provideLdaOrPassword provideLdaOrPassword --> getIDVSelfieProcessStartConfirmation provideLdaOrPassword -- Failure --> onIDVBiometricOptInStatus getIDVSelfieProcessStartConfirmation --> setIDVSelfieProcessStartConfirmation setIDVSelfieProcessStartConfirmation -- true --> showSelfieScreen showSelfieScreen --> onIDVOptInCapturedFrameConfirmation setIDVSelfieProcessStartConfirmation -- false --> onIDVBiometricOptInStatus onIDVOptInCapturedFrameConfirmation --> setIDVBiometricOptInConfirmation setIDVBiometricOptInConfirmation -- Status = RDNA_IDV_APPROVED || RDNA_IDV_CANCEL --> onIDVBiometricOptInStatus setIDVBiometricOptInConfirmation -- Status = RDNA_IDV_RECAPTURE --> showSelfieScreen %% Success Callback Styling style onUserLoggedIn fill:#d4fdd4,stroke:#228b22,stroke-width:2px style onIDVCheckUserBiometricTemplateStatus fill:#d4fdd4,stroke:#228b22,stroke-width:2px style getIDVSelfieProcessStartConfirmation fill:#d4fdd4,stroke:#228b22,stroke-width:2px style onIDVOptInCapturedFrameConfirmation fill:#d4fdd4,stroke:#228b22,stroke-width:2px style onIDVBiometricOptInStatus fill:#d4fdd4,stroke:#228b22,stroke-width:2px %% App-Initiated Call Styling style checkIDVUserBiometricTemplateStatus fill:#ffe4b3,stroke:#ff8c00,stroke-width:2px style initiateIDVBiometricOptIn fill:#ffe4b3,stroke:#ff8c00,stroke-width:2px style setIDVSelfieProcessStartConfirmation fill:#ffe4b3,stroke:#ff8c00,stroke-width:2px style setIDVBiometricOptInConfirmation fill:#ffe4b3,stroke:#ff8c00,stroke-width:2px
π© Green - Callbacks issued by REL-ID SDK
π§ Orange - APIs invoked by the Client App
π§ Developer Tips
- Always validate challengeMode and workflow when responding to events.
- Store final status and consent in appβs secure logs if required.
- Provide user-friendly guidance throughout the flow.
Updated about 2 months ago