Passkey Challenge

Overview

The Passkey User Consent Challenge is presented by the application when the REL-ID SDK requires user consent to perform a passkey operation. The SDK initiates the challenge and hands control to the app via a callback; the app is responsible for showing a consent UI and relaying the user's decision back to the SDK.


🧩 What is the Passkey Challenge?

The Passkey Challenge is a Ditto SDK's authentication step that leverages the platform's native FIDO2/WebAuthn passkey capability (Face ID, Touch ID, fingerprint, or device PIN) instead of a traditional password or OTP.

It is not a challenge where the user types something it is a consent gate followed by a platform biometric/credential operation managed by the OS (Apple's ASAuthorization framework on iOS, FIDO2 credential manager on Android).

It is triggered via the getUserConsentForPasskey event.


🔄 When Is It Triggered?

The SDK fires this challenge in two scenarios, indicated by the passkeyOp parameter:

RDNAPasskeyOperationValueScenario
RDNA_PASSKEY_OP_REGISTER0During device activation the SDK wants to register a passkey credential for the user
RDNA_PASSKEY_OP_AUTHENTICATE1During login / authentication — the SDK wants to use a previously registered passkey to authenticate

🧠 What the App Must Do

When the getUserConsentForPasskey method is triggered by the SDK, the app must:

  1. App must implement this delegate/callback method.
  2. Show consent UI to the user based on passkeyOp. For the passkeyOp for RDNA_PASSKEY_OP_AUTHENTICATE you can silently call setUserConsentForPasskey() with value true.
  3. Submit it using setUserConsentForPasskey()

getUserConsentForPasskey Event

📥 Sample Payload – getUserConsentForPasskey


{
  "userID" : "sktest",
  "challengeMode" : 1,
  "passkeyOp" : 0,
  "error" : {
    "longErrorCode" : 0,
    "shortErrorCode" : 0,
    "errorString" : "Success"
  }
}

🧾 Top-Level Fields

FieldDescription
userIDUnique identifier for the user being challenged
challengeModeChallenge handling mode
passkeyOpPasskey Operation mode for either register or authenticate
errorError object

Did this page help you?