PasskeyBetterAuth class

Better Auth passkey.

Mirrors the Better Auth TS client's two-step WebAuthn flow (client.ts):

  1. generateRegistrationOptions → WebAuthn create; verifyRegistration(body: ...)
  2. generateAuthenticationOptions → WebAuthn get; verifyAuthentication(body: ...)

Combine with passkeys or platform Web APIs for the ceremony.

Constructors

PasskeyBetterAuth(Dio _dio, {String? baseUrl})

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<Map<String, dynamic>>>
GET /passkey/generate-authenticate-options
generateRegistrationOptions({String? name, String? authenticatorAttachment, String? context}) Future<Result<Map<String, dynamic>>>
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) Future<Result<SessionResponse>>
POST /passkey/verify-authentication — sets session on success.
verifyRegistration(Map<String, dynamic> body) Future<Result<PasskeyRecord>>
POST /passkey/verify-registration

Operators

operator ==(Object other) bool
The equality operator.
inherited