passkey_ui_kit library

The UI layer passkeys never had.

Drop-in, themeable screens and widgets for passkey (passwordless, biometric) authentication in Flutter. Built on top of the open-source passkeys plugin: this package handles the UX (buttons, onboarding, management, fallback), while your app implements a small PasskeyBackend that talks to your relying-party (WebAuthn) server.

Start with PasskeySignInButton, PasskeyRegisterButton, PasskeyIntroScreen, and PasskeyManagementScreen. Everything is driven by PasskeyAuthController and gated by PasskeyAvailability.

Classes

AuthenticateOptions
Server-generated options needed to sign in (authenticate) with a passkey.
AuthenticateRequestType
The AuthenticateRequestType is used to create an authentication request and send it to the platform.
AuthenticateResponseType
The response returned by the platform after an authentication flow.
AuthenticatorSelectionType
Describes the relying party's requirements for the authenticator that should be used during a credential operation.
AuthSession
The result of a successful sign-in.
BiometricIcon
A platform-aware biometric glyph.
CredentialType
The CredentialType class wraps the data of a credential it can be used to explicitly exclude or allow credentials.
PasskeyAuthController
Orchestrates the full passkey register / authenticate flow.
PasskeyAuthState
An immutable snapshot of the controller's state, exposed via PasskeyAuthController.state so widgets can rebuild reactively.
PasskeyAvailability
Wraps the passkeys plugin's availability check and maps its platform-specific result to a single PasskeySupportStatus.
PasskeyBackend
The single seam between passkey_ui_kit and your infrastructure.
PasskeyErrorMessages
Central mapping from typed exceptions to friendly, user-facing strings.
PasskeyFallbackFlow
Chooses between a passkey UI and a developer-provided fallback based on device support.
PasskeyInfo
Metadata describing a single passkey registered for the current user.
PasskeyIntroCopy
All user-facing text on PasskeyIntroScreen.
PasskeyIntroScreen
A full-screen onboarding explainer that introduces passkeys in plain language and offers to set one up.
PasskeyManagementScreen
A settings-style screen that lists, adds, and removes the current user's passkeys.
PasskeyRegisterButton
A drop-in "Add a Passkey" button.
PasskeySignInButton
A drop-in "Sign in with Passkey" button.
PasskeyUiTheme
Centralized styling for every widget in passkey_ui_kit.
PubKeyCredParamType
The PubKeyCredParamType class wraps the data of a public key credential parameter. It is used to specify the type and algorithm of the public key credential that is being requested.
RegisterOptions
Server-generated options needed to create (register) a new passkey.
RegisterRequestType
The RegisterRequestType is used to create a registration request and send it to the platform.
RegisterResponseType
The response returned by the platform after a registration flow.
RelyingPartyType
The RelyingPartyType class wraps the data of a relying party. It is used to identify the party that is requesting authentication.
UserType
The UserType class wraps the data of a user..

Enums

MediationType
Defines how user mediation (interaction) should be handled during credential operations.
PasskeyAuthStatus
The lifecycle phase of a passkey operation.
PasskeyIconStyle
Visual style for a biometric icon.
PasskeySupportStatus
The passkey-support level of the current device.

Typedefs

AvailabilityProbe = Future<AvailabilityType> Function()
A function that returns the raw platform availability info.

Exceptions / Errors

PasskeyBackendException
Thrown when a call into the host app's PasskeyBackend fails.
PasskeyCancelledException
Thrown when the user dismisses the system biometric / passkey prompt.
PasskeyDuplicateException
Thrown when the user tries to register a passkey that already exists on the device for this account.
PasskeyNoCredentialsException
Thrown during sign-in when the device has no passkey available for the account.
PasskeyUiException
Base class for all exceptions surfaced by passkey_ui_kit.
PasskeyUnknownException
Thrown when the underlying plugin fails in a way this package does not model explicitly. Inspect cause for the original error.
PasskeyUnsupportedException
Thrown when the current device cannot use passkeys at all.