WebAuthnApi
WebAuthn API wrapper for Supabase Auth. Provides methods for enrolling, challenging, verifying, authenticating, and registering WebAuthn credentials.
§Constructors
§Properties
§Methods
Complete WebAuthn authentication flow. Performs challenge and verification in a single operation for existing credentials.
- Authentication parameters
- ID of the WebAuthn factor to authenticate with
- WebAuthn configuration
- Relying Party ID (defaults to current hostname)
- Allowed origins (defaults to current origin)
- Optional abort signal
- Override options for navigator.credentials.get
Authentication result
Challenge for WebAuthn credential creation or authentication. Combines server challenge with browser credential operations. Handles both registration (create) and authentication (request) flows.
- Allows you to override the parameters passed to navigator.credentials
- Override options for credential creation
- Override options for credential request
Challenge response with credential or error
Enroll a new WebAuthn factor. Creates an unverified WebAuthn factor that must be verified with a credential.
- Enrollment parameters (friendlyName required)
Enrolled factor details or error
Complete WebAuthn registration flow. Performs enrollment, challenge, and verification in a single operation for new credentials.
- Registration parameters
- User-friendly name for the credential
- Relying Party ID (defaults to current hostname)
- Allowed origins (defaults to current origin)
- Optional abort signal
- Override options for navigator.credentials.create
Registration result
Verify a WebAuthn credential with the server. Completes the WebAuthn ceremony by sending the credential to the server for verification.
- Verification parameters
- ID of the challenge being verified
- ID of the WebAuthn factor
- WebAuthn credential response
Verification result with session or error