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 biometric
  • false ➝ 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

StepSDK ElementDescription
1onIDVCheckUserBiometricTemplateStatusCheck existing template
2initiateIDVBiometricOptIn()Starts opt-in process
3getPassword(if required) ask user for password
4getIDVSelfieProcessStartConfirmationPrepare user for selfie
5setIDVSelfieProcessStartConfirmation()Launch selfie capture
6onIDVOptInCapturedFrameConfirmationPreview image to user
7setIDVBiometricOptInConfirmation()User confirms image
8onIDVBiometricOptInStatusTemplate 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.