getIDVBiometricOptInConsent

šŸ”„ Event: getIDVBiometricOptInConsent

šŸ“˜ Description

Triggered by the SDK when the Ditto ID IDV workflow requires the user’s consent to store their biometric template on the server. This ensures compliance with data privacy regulations.


šŸ–„ļø Screen to Present

  • Explain why biometric data is being stored.
  • Provide:
    • āœ… "Agree"
    • āŒ "Decline"

šŸ§‘ā€šŸ’» Platform Support

React Native
EventEmitter.addListener('getIDVBiometricOptInConsent', getIDVBiometricOptInConsent);
Flutter
rdna.on(RdnaClient.getIDVBiometricOptInConsent, getIDVBiometricOptInConsent);
Cordova
document.addEventListener('getIDVBiometricOptInConsent', getIDVBiometricOptInConsent, false);
Native iOS
(void)getIDVBiometricOptInConsent:(NSString *)userID
                          response:(RDNAChallengeResponse *)response
                     challengeMode:(RDNAChallengeOpMode)mode
                             error:(RDNAError *)error;
Native Android
void getIDVBiometricOptInConsent(String userID, RDNAChallengeResponse response, int mode, RDNAError error);

šŸ“¤ Response Format

{
  "userID": "ok",
  "idvResponse": "",
  "challengeMode": 8,
  "attemptsLeft": 0,
  "status": {
    "statusCode": 100,
    "statusMessage": "Success."
  },
  "error": {
    "longErrorCode": 0,
    "shortErrorCode": 0,
    "errorString": "Success"
  }
}

🧩 Field Definitions

FieldTypeDescription
userIDStringThe user's ID
idvResponseStringResponse data if any
challengeModeIntegerChallenge context (e.g., 8 = Activation)
statusObjectStatus object with code/message
errorObjectRDNAError structure for errors

šŸ› ļø API: setIDVBiometricOptInConsent

🧭 Overview

This API must be called after the user chooses to opt in or opt out of biometric template storage.


šŸ“„ Parameters

ParameterTypeDescription
isOptInBooleantrue = Agree to store, false = Decline
challengeModeIntegerChallenge mode received from the event

šŸ› ļø Response API: setIDVBiometricOptInConsent

Description:

This API set the user consent for the biometric opt in allow or cancels based on user input.


šŸ’» API Usage

React Native
RdnaClient.setIDVBiometricOptInConsent(true, challengeMode, (response) => {});
Flutter
rdna.setIDVBiometricOptInConsent(true, challengeMode);
Cordova
com.uniken.rdnaplugin.RdnaClient.setIDVBiometricOptInConsent(
  successCallback,
  errorCallback,
  [true, challengeMode]
);
Native iOS
(RDNAError *)setIDVBiometricOptInConsent:(BOOL)isOptIn challengeMode:(RDNAChallengeOpMode) opMode;
Native Android
RDNA.RDNAError setIDVBiometricOptInConsent(boolean isOptIn, int challengeMode);

Error Codes:

CodeDescriptionDeveloper Action
100SuccessProceed with next step
400Unable to processShow retry option
600Biometric template does not existRe-initiate IDV or contact support

🧠 Best Practices

  • Always present clear and legally compliant messaging to the user.
  • Do not proceed until user has explicitly opted in or out.

āŒ What Happens When isOptIn = false in setIDVBiometricOptInConsent

When the application submits setIDVBiometricOptInConsent with isOptIn = false, the SDK processes this as the user explicitly declining consent to store their biometric template on the server.


šŸ”„ Outcome of isOptIn = false

  1. 🚫 Biometric template is NOT stored on the Ditto ID server.
  2. šŸ“„ SDK records that the user has opted out.
  3. šŸ” Biometric login from server will not be available in future sessions.
  4. šŸ” Fallback authentication (password, OTP, or device biometrics) may be used instead.
  5. āš™ļø Depending on backend policy:
    • The IDV flow may continue if opt-in is optional
    • Or may terminate/redirect if biometric storage is mandatory

🧭 Developer Recommendations

  • āœ… Show a clear confirmation message like:

    "You’ve chosen not to store your biometric data. We’ll use alternative methods to verify you in future."

  • šŸ”„ Ensure fallback mechanisms are available:

    • Password login
    • OTP/email-based verification
    • Device-native biometrics (Face ID, Fingerprint)

🧠 Notes

  • Users may opt in later by re-triggering the biometric template challenge.
  • The decision can be logged for compliance tracking.

āœ… What Happens When isOptIn = true in setIDVBiometricOptInConsent

When the application submits setIDVBiometricOptInConsent with isOptIn = true, the Ditto ID SDK interprets this as the user providing explicit consent to store their biometric template securely on the server.


šŸ”„ Outcome of isOptIn = true

  1. šŸ“¦ Biometric template is stored securely on the Ditto ID server.
  2. šŸ” Enables biometric-first login or passwordless authentication for future logins and verification flows.
  3. 🧾 SDK logs consent for compliance purposes (e.g., GDPR, IT Act).
  4. šŸ”„ The IDV workflow proceeds to the next step.

🧭 Developer Recommendations

  • Show a confirmation message like:

    "Your biometric data has been securely stored. You can now enjoy faster, secure logins."

  • Ensure your backend supports biometric authentication for the opted-in user.


šŸš€ Benefits

  • Faster authentication
  • Seamless onboarding or re-verification
  • Reduced reliance on passwords or OTP