PasskeyAuthController class
Orchestrates the full passkey register / authenticate flow.
It wires together the host app's PasskeyBackend and the platform
PasskeyAuthenticator from the passkeys plugin, exposes progress through
state, and translates every low-level plugin error into a typed
PasskeyUiException. This is the reusable brain behind all the widgets in
this package; you can also drive it directly for a fully custom UI.
Constructors
- PasskeyAuthController({required PasskeyBackend backend, PasskeyAuthenticator? authenticator})
-
Creates a controller bound to
backend.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
→ ValueNotifier<
PasskeyAuthState> -
The current state. Listen to this to drive reactive UI.
final
Methods
-
authenticate(
{String? username}) → Future< AuthSession> - Authenticates with a passkey and returns the resulting AuthSession.
-
dispose(
) → void - Releases the state notifier. Call this when the owning widget disposes.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register(
String username) → Future< void> -
Registers a new passkey for
username. -
reset(
) → void - Resets state back to PasskeyAuthState.idle.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited