BetterAuthPasskey class abstract
Better Auth passkey
plugin.
Mirrors the Better Auth TS client's two-step WebAuthn flow:
generateRegistrationOptions→ WebAuthncreate;verifyRegistrationwith the resultingresponseJSON.generateAuthenticationOptions→ WebAuthnget;verifyAuthenticationwith the resultingresponseJSON — this sets the session on success.
Combine with passkeys or platform
Web APIs for the ceremony itself. Requires the passkey() plugin on your
Better Auth server.
- Annotations
-
- @RestApi.new(callAdapter: BetterAuthCallAdapter)
Constructors
- BetterAuthPasskey(Dio dio, {String? baseUrl, ParseErrorLogger? errorLogger})
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
deletePasskey(
{required String id}) → Future< Result< StatusResponse> > -
POST /passkey/delete-passkey. -
generateAuthenticationOptions(
) → Future< Result> -
GET /passkey/generate-authenticate-options. -
generateRegistrationOptions(
{String? name, String? authenticatorAttachment}) → Future< Result> -
GET /passkey/generate-register-options. -
listUserPasskeys(
) → Future< Result< List< >PasskeyRecord> > -
GET /passkey/list-user-passkeys. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updatePasskey(
{required String id, required String name}) → Future< Result< PasskeyUpdateResponse> > -
POST /passkey/update-passkey. -
verifyAuthentication(
{Map< String, dynamic> body = const {}}) → Future<Result< SessionResponse> > -
POST /passkey/verify-authentication— sets the session on success. -
verifyRegistration(
{Map< String, dynamic> body = const {}}) → Future<Result< PasskeyRecord> > -
POST /passkey/verify-registration.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited