FidoClient

Core FIDO operations handler for Android applications.

This class provides unified FIDO2 functionality by automatically selecting the most appropriate API based on device capabilities and configuration. It supports:

  • Android Credential Manager API: For modern passkey experiences (Android 14+)

  • Google Play Services FIDO2 API: For broader device compatibility (Android 7+)

Key Features:

  • Automatic API selection based on availability and configuration

  • Support for both discoverable and non-discoverable credentials

  • Unified interface for different underlying implementations

  • Comprehensive error handling and logging

  • Customizable request options through lambda functions

Usage Patterns:

// Basic usage with default configuration
val client = FidoClient()

// Custom configuration
val client = FidoClient {
logger = customLogger
useFido2Client = true // Force to use Fido2 Library
}

See also

Constructors

Link copied to clipboard
constructor(config: FidoClientConfig)

Types

Link copied to clipboard
object Companion

Functions

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

Unified authentication method that automatically selects the appropriate API.

Link copied to clipboard
suspend fun register(input: JsonObject, block: FidoRegistrationCustomizer.() -> Unit = {}): Result<JsonObject>

Registers a new FIDO credential using Android Credential Manager.