FidoAuthenticationCallback

FIDO2 authentication callback using Android Credential Manager for discoverable credentials.

This callback implementation handles FIDO2 authentication using the Android Credential Manager API, which provides support for discoverable credentials (passkeys) and cross-device synchronization. This implementation is used as a fallback when Google Play Services FIDO2 API is not available on the device.

Key Features:

  • Supports discoverable credentials (passkeys)

  • Cross-device credential synchronization (when supported by the device)

  • Modern Android Credential Manager API integration

  • Automatic user account selection from available passkeys

  • No need for explicit allowCredentials list (discoverable)

Device Requirements:

  • Android 14+ for full Credential Manager support

  • Fallback support on older Android versions with compatible credential providers

  • Device must support platform authenticators or external security keys

API Selection Logic: This implementation is selected when:

  • Google Play Services FIDO (com.google.android.gms.fido.Fido) class is not found at runtime

  • The device supports Android Credential Manager

  • Provides broader compatibility across different Android versions

The callback processes authentication request options from the server, performs the authentication using discoverable credentials, and formats the response according to Journey framework expectations.

See also

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
lateinit var publicKeyCredentialRequestOptions: JsonObject

The public key credential request options for FIDO2 authentication.

Functions

Link copied to clipboard
suspend fun authenticate(block: FidoAuthenticateCustomizer.() -> Unit = {}): Result<JsonObject>

Performs FIDO2 authentication using the initialized request options.

Link copied to clipboard
protected open override fun init(name: String, value: JsonElement)

Initializes the callback with data from the Journey workflow.