PasskeysClient

interface PasskeysClient

Passkey (WebAuthn) authentication methods.

Properties

Link copied to clipboard
abstract val isSupported: Boolean

Whether passkeys are supported on the current platform.

Functions

Link copied to clipboard
abstract suspend fun authenticate(parameters: PasskeysParameters): WebAuthnAuthenticateResponse

Authenticates the user with an existing registered passkey. Performs a two-step flow: calls POST /sdk/v1/webauthn/authenticate/start/primary (no session) or POST /sdk/v1/webauthn/authenticate/start/secondary (with session) to get assertion options, invokes the platform credential API, then calls POST /sdk/v1/webauthn/authenticate to complete.

Link copied to clipboard
abstract suspend fun register(parameters: PasskeysParameters): WebAuthnRegisterResponse

Registers a new passkey for the current user. Performs a two-step flow: calls POST /sdk/v1/webauthn/register/start to get creation options, invokes the platform credential API to create the passkey, then calls POST /sdk/v1/webauthn/register to complete registration. Requires an active session.

Link copied to clipboard
abstract suspend fun update(id: String, request: IWebAuthnUpdateParameters): WebAuthnUpdateResponse

Updates metadata for an existing passkey registration (e.g. sets a user-friendly display name). Calls the PUT /sdk/v1/webauthn/update/{webauthn_registration_id} endpoint.