Request a WebAuthn credential assertion challenge for login.
Calls Auth0 POST /passkey/challenge.
Optionaloptions: PasskeyChallengeOptions
Optional connection or organization.
Challenge with authSession and authnParamsPublicKey.
Request a WebAuthn credential creation challenge to enroll a new passkey
for the currently authenticated user.
Calls Auth0 MyAccount POST /me/v1/authentication-methods.
Requires an active session.
Optionaloptions: PasskeyEnrollmentChallengeOptionsComplete a passkey enrollment by verifying the WebAuthn attestation.
Calls Auth0 MyAccount POST /me/v1/authentication-methods/{id}/verify.
Requires an active session.
Complete a passkey signup or login by exchanging the WebAuthn assertion
for an Auth0 session. Calls Auth0 POST /oauth/token with the WebAuthn grant.
Session cookie is set automatically by the SDK.
For a signup where register() returned verificationRequired, pass the codes
the user entered in verification, for example { email: '123456' }. Omit it
otherwise, including on login.
On a wrong code this throws a PasskeyGetTokenError whose isRetryable is
true, whose authSession is set and whose verificationRequired lists the
identifiers still needing a code. Call again with the same authSession and
credential, sending codes only for those identifiers.
authSession from the challenge + serialised credential, and the verification codes when register() returned verificationRequired.
Request a WebAuthn credential creation challenge for a new user signup.
Calls Auth0 POST /passkey/register.
When the connection requires the user's email address or phone number to be
verified, the response includes verificationRequired (for example
['email', 'phone']), and Auth0 sends a one-time code to each listed
identifier during this call. verificationRequired is absent when no
verification is required.
deliveryMethod ('text' or 'voice') chooses how the phone code is
delivered. Leave it out to let Auth0 use the channel the connection supports
(SMS when it supports both or none). Auth0 rejects a channel that the
connection does not support with invalid_request.
Every call starts a separate attempt with its own authSession and, when
verification is required, sends new codes. To recover from a wrong code,
retry getToken() instead of calling this again. Do not rely only on Auth0's
limits: rate-limit the route that calls this method yourself, per IP address
and per email address or phone number.
Optionaloptions: PasskeyRegisterOptions
User profile, optional connection/organization, and an optional deliveryMethod for the phone code.
Challenge with authSession and authnParamsPublicKey.
Server-side passkey interface — individual step methods for authentication flows. Used by
auth0.passkeyon the server singleton. Each method maps directly to one Auth0 API call.