feat: add Passkey APIs to Authentication API reference#1373
Conversation
Add the missing main/docs/api/authentication/passkey/register.mdx that should have been part of the previous commit, and remove main/docs/authenticate/login/embedded-login/use-cases/enrollment.mdx, which was committed by mistake and is out of scope for this PR. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
# Conflicts: # main/config/navigation/generated/authentication.en.json
Remove the manually-edited authentication.en.json from this PR. The Passkey API pages are added as content-only; navigation will be handled separately through the OAS-generated nav pipeline. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
| @@ -0,0 +1,79 @@ | |||
| --- | |||
| title: "Start a Passkey Challenge" | |||
| description: "Request a passkey challenge so a user can authenticate to your native or web application using a previously registered passkey." | |||
There was a problem hiding this comment.
| description: "Request a passkey challenge so a user can authenticate to your native or web application using a previously registered passkey." | |
| description: "Request a passkey challenge for users to authenticate to your Native or Web application using an existing, registered passkey." |
|
|
||
| `POST /passkey/challenge` | ||
|
|
||
| Request a passkey challenge so a user can authenticate to your native or web application using a previously registered passkey. The endpoint returns the WebAuthn parameters your client uses to invoke the platform authenticator, along with an `auth_session` value that you exchange for tokens at `/oauth/token` using the passkey grant. |
There was a problem hiding this comment.
| Request a passkey challenge so a user can authenticate to your native or web application using a previously registered passkey. The endpoint returns the WebAuthn parameters your client uses to invoke the platform authenticator, along with an `auth_session` value that you exchange for tokens at `/oauth/token` using the passkey grant. | |
| Request a passkey challenge so a user can authenticate to your Native or Web application using a previously registered passkey. The endpoint returns the WebAuthn parameters your application uses to invoke the platform authenticator, and an `auth_session` value you exchange for tokens at `/oauth/token` using the passkey grant. |
|
|
||
| Request a passkey challenge so a user can authenticate to your native or web application using a previously registered passkey. The endpoint returns the WebAuthn parameters your client uses to invoke the platform authenticator, along with an `auth_session` value that you exchange for tokens at `/oauth/token` using the passkey grant. | ||
|
|
||
| This endpoint backs the Passkey APIs for native and web applications and is used in combination with the Auth0 [token exchange for passkey](https://auth0.com/docs/authenticate/database-connections/passkeys) grant type. |
There was a problem hiding this comment.
| This endpoint backs the Passkey APIs for native and web applications and is used in combination with the Auth0 [token exchange for passkey](https://auth0.com/docs/authenticate/database-connections/passkeys) grant type. | |
| This endpoint backs the Passkey APIs for Native and Web applications. Use this endpoint in combination with the Auth0 [token exchange for passkey](https://auth0.com/docs/authenticate/database-connections/passkeys) grant type. |
|
|
||
| This endpoint backs the Passkey APIs for native and web applications and is used in combination with the Auth0 [token exchange for passkey](https://auth0.com/docs/authenticate/database-connections/passkeys) grant type. | ||
|
|
||
| ### Remarks |
There was a problem hiding this comment.
| ### Remarks | |
| ## Remarks |
|
|
||
| ### Remarks | ||
|
|
||
| - The application's grant types must include `urn:okta:params:oauth:grant-type:webauthn`. |
There was a problem hiding this comment.
| - The application's grant types must include `urn:okta:params:oauth:grant-type:webauthn`. | |
| - The application's [grant types](/docs/get-started/applications/application-settings#grant-types) must include: `urn:okta:params:oauth:grant-type:webauthn`. |
| - The application must be OIDC conformant. | ||
| - The request must be made against a [custom domain](https://auth0.com/docs/customize/custom-domains) configured for your tenant. Calls to the default Auth0 domain (`{tenant}.auth0.com`) are rejected. | ||
|
|
||
| ### Learn More |
There was a problem hiding this comment.
The Learn more section should be at the end of the article starting on line 81 to be consistent with the rest of Docs.
| </ParamField> | ||
|
|
||
| <ParamField body="realm" type="string"> | ||
| Name of the database connection to authenticate against. If omitted, the tenant's default database connection for the application is used. |
There was a problem hiding this comment.
| Name of the database connection to authenticate against. If omitted, the tenant's default database connection for the application is used. | |
| Name of the database connection to authenticate against. If omitted, Auth0 uses your tenant's default database connection for the application. |
| </ParamField> | ||
|
|
||
| <ParamField body="organization" type="string"> | ||
| ID of the [organization](https://auth0.com/docs/manage-users/organizations) the user is signing in to. Required when the application's `organization_usage` is set to `require`. |
There was a problem hiding this comment.
| ID of the [organization](https://auth0.com/docs/manage-users/organizations) the user is signing in to. Required when the application's `organization_usage` is set to `require`. | |
| ID of the [Auth0 Organization](https://auth0.com/docs/manage-users/organizations) to which the user is signing in. Required when the application's `organization_usage` is set to `require`. |
|
|
||
| ## Response | ||
|
|
||
| A successful response contains the WebAuthn parameters your client passes to the platform authenticator and an `auth_session` value that ties the subsequent assertion to this challenge. |
There was a problem hiding this comment.
| A successful response contains the WebAuthn parameters your client passes to the platform authenticator and an `auth_session` value that ties the subsequent assertion to this challenge. | |
| A successful response contains the WebAuthn parameters your application passes to the platform authenticator and an `auth_session` value that ties the subsequent assertion to this challenge. |
| </ResponseField> | ||
|
|
||
| <ResponseField name="rpId" type="string"> | ||
| Relying Party identifier. Defaults to the tenant custom domain. When the tenant has a custom Relying Party identifier configured, that value is returned instead. |
There was a problem hiding this comment.
| Relying Party identifier. Defaults to the tenant custom domain. When the tenant has a custom Relying Party identifier configured, that value is returned instead. | |
| [Relying party identifier(RP ID)](/docs/authenticate/database-connections/passkeys#relying-party-id-for-passkeys). Defaults to the tenant custom domain. When the tenant has a custom relying party identifier configured, Auth0 returns the `rp.id` value instead. |
| @@ -0,0 +1,163 @@ | |||
| --- | |||
| title: "Register a New User With a Passkey" | |||
| description: "Initiate passkey registration for a new user during sign up. Returns the WebAuthn creation parameters and an auth_session used to complete enrollment." | |||
There was a problem hiding this comment.
| description: "Initiate passkey registration for a new user during sign up. Returns the WebAuthn creation parameters and an auth_session used to complete enrollment." | |
| description: "Initiate passkey registration for a new user during sign up. Returns the WebAuthn creation parameters and the `auth_session` users need to complete enrollment." |
|
|
||
| `POST /passkey/register` | ||
|
|
||
| Initiate passkey registration for a new user during sign up. The endpoint creates a passkey enrollment session, validates the supplied user profile against the database connection's signup attributes, and returns the WebAuthn creation parameters your client passes to the platform authenticator. After the authenticator returns an attestation, you complete enrollment by exchanging the assertion at `/oauth/token` using the passkey grant. |
There was a problem hiding this comment.
| Initiate passkey registration for a new user during sign up. The endpoint creates a passkey enrollment session, validates the supplied user profile against the database connection's signup attributes, and returns the WebAuthn creation parameters your client passes to the platform authenticator. After the authenticator returns an attestation, you complete enrollment by exchanging the assertion at `/oauth/token` using the passkey grant. | |
| Initiate passkey registration for a new user during sign up. The endpoint creates a passkey enrollment session, validates the supplied user profile against the database connection's signup attributes, and returns the WebAuthn creation parameters your application passes to the platform authenticator. After the authenticator returns an attestation, you complete enrollment by exchanging the assertion at `/oauth/token` using the passkey grant. |
|
|
||
| Initiate passkey registration for a new user during sign up. The endpoint creates a passkey enrollment session, validates the supplied user profile against the database connection's signup attributes, and returns the WebAuthn creation parameters your client passes to the platform authenticator. After the authenticator returns an attestation, you complete enrollment by exchanging the assertion at `/oauth/token` using the passkey grant. | ||
|
|
||
| ### Remarks |
There was a problem hiding this comment.
| ### Remarks | |
| ## Remarks |
|
|
||
| ### Remarks | ||
|
|
||
| - The application's grant types must include `urn:okta:params:oauth:grant-type:webauthn`. |
There was a problem hiding this comment.
| - The application's grant types must include `urn:okta:params:oauth:grant-type:webauthn`. | |
| - The application's [grant types](/docs/get-started/applications/application-settings#grant-types) must include: `urn:okta:params:oauth:grant-type:webauthn`. |
| - `user_profile` must contain every identifier marked `required` for signup on the connection (commonly `email`, `phone_number`, or `username`). Additional identifiers may be `optional`. | ||
| - A user is identified as already-existing through any of the configured identifiers; if any submitted identifier resolves to an existing user, the request fails with `invalid_request`. | ||
|
|
||
| ### Learn More |
There was a problem hiding this comment.
Move line 19-23 to the end of the article to be consisten with Docs
| </ParamField> | ||
|
|
||
| <ParamField body="realm" type="string"> | ||
| Name of the database connection the user is signing up against. If omitted, the tenant's default database connection for the application is used. |
There was a problem hiding this comment.
| Name of the database connection the user is signing up against. If omitted, the tenant's default database connection for the application is used. | |
| Name of the database connection the user is signing up against. If omitted, Auth0 uses your tenant's default database connection for the application. |
| </ParamField> | ||
|
|
||
| <ParamField body="organization" type="string"> | ||
| ID of the [organization](https://auth0.com/docs/manage-users/organizations) the user is signing up into. Required when the application's `organization_usage` is set to `require`. |
There was a problem hiding this comment.
| ID of the [organization](https://auth0.com/docs/manage-users/organizations) the user is signing up into. Required when the application's `organization_usage` is set to `require`. | |
| ID of the [Auth0 Organization](https://auth0.com/docs/manage-users/organizations) to which the user is signing in. Required when the application's `organization_usage` is set to `require`. |
|
|
||
| <Expandable title="properties"> | ||
| <ParamField body="email" type="string"> | ||
| User's email address. Validated against the JSON Schema email format. |
There was a problem hiding this comment.
| User's email address. Validated against the JSON Schema email format. | |
| User's email address. Validated against the `JSON` schema email format. |
| </ParamField> | ||
|
|
||
| <ParamField body="phone_number" type="string"> | ||
| User's phone number in E.164 format (1–30 characters, international `+` prefix). |
| </ParamField> | ||
|
|
||
| <ParamField body="username" type="string"> | ||
| User's username. Validated against the connection's username policy (length and allowed characters). |
There was a problem hiding this comment.
| User's username. Validated against the connection's username policy (length and allowed characters). | |
| User's username. Validates against the connection's username policy (length and allowed characters). |
| </ResponseField> | ||
|
|
||
| <ResponseField name="rp" type="object"> | ||
| Relying Party identity. |
There was a problem hiding this comment.
| Relying Party identity. | |
| Relying party identity. |
|
|
||
| <Expandable title="properties"> | ||
| <ResponseField name="id" type="string"> | ||
| Relying Party identifier. Defaults to the tenant custom domain or the configured custom Relying Party identifier. |
There was a problem hiding this comment.
| Relying Party identifier. Defaults to the tenant custom domain or the configured custom Relying Party identifier. | |
| Relying party identifier (RP ID). Defaults to the tenant custom domain or the configured custom Relying party identifier. |
| </ResponseField> | ||
|
|
||
| <ResponseField name="name" type="string"> | ||
| Relying Party display name. Returned identical to `rp.id`. |
There was a problem hiding this comment.
| Relying Party display name. Returned identical to `rp.id`. | |
| Relying party display name. Returned identical to `rp.id`. |
| </ResponseField> | ||
|
|
||
| <ResponseField name="user" type="object"> | ||
| WebAuthn user handle to bind the new credential to. |
There was a problem hiding this comment.
| WebAuthn user handle to bind the new credential to. | |
| WebAuthn user handle to which you bind the new credential. |
| </ResponseField> | ||
|
|
||
| <ResponseField name="pubKeyCredParams" type="array"> | ||
| Allowed credential public-key algorithms in preference order. Auth0 returns EdDSA (`-8`), ES256 (`-7`), and RS256 (`-257`). |
There was a problem hiding this comment.
| Allowed credential public-key algorithms in preference order. Auth0 returns EdDSA (`-8`), ES256 (`-7`), and RS256 (`-257`). | |
| Allowed credential [public-key algorithms](/docs/get-started/applications/signing-algorithms) in preference order. Auth0 returns EdDSA (`-8`), ES256 (`-7`), and RS256 (`-257`). |
| | 400 | Invalid request. Common causes include missing required `user_profile` identifiers, an invalid `user_profile` field, an invalid `user_metadata` field, the user already exists, the application is not configured for passkey authentication, the request was not made against a custom domain, or the application is third-party. | | ||
| | 401 | Unauthorized. Invalid client credentials. | | ||
| | 404 | The Passkey APIs are not enabled for the tenant. | | ||
| | 429 | Too many requests. Per-IP rate limit exceeded. | |
There was a problem hiding this comment.
| | 429 | Too many requests. Per-IP rate limit exceeded. | | |
| | 429 | Too many requests. Per-IP rate limit exceeded. | | |
| ## Learn more | |
| - [Passkeys APIs](https://auth0.com/docs/authenticate/database-connections/passkeys/native-passkeys-api) | |
| - [Configure Passkey Policy](https://auth0.com/docs/authenticate/database-connections/passkeys/configure-passkey-policy) | |
| - [Custom Domains](https://auth0.com/docs/customize/custom-domains) |
| | 400 | Invalid request. Common causes include missing or invalid parameters, the application is not configured for passkey authentication, the request was not made against a custom domain, or the application is third-party. | | ||
| | 401 | Unauthorized. Invalid client credentials. | | ||
| | 404 | The Passkey APIs are not enabled for the tenant. | | ||
| | 429 | Too many requests. Per-IP rate limit exceeded. | |
There was a problem hiding this comment.
| | 429 | Too many requests. Per-IP rate limit exceeded. | | |
| | 429 | Too many requests. Per-IP rate limit exceeded. | | |
| ## Learn more | |
| - [Passkeys APIs](https://auth0.com/docs/authenticate/database-connections/passkeys/native-passkeys-api) | |
| - [Configure Passkey Policy](https://auth0.com/docs/authenticate/database-connections/passkeys/configure-passkey-policy) | |
| - [Custom Domains](https://auth0.com/docs/customize/custom-domains) |
Description
Adds reference documentation for the new Passkey APIs (
POST /passkey/challengeand
POST /passkey/register) under the Authentication API, in support of theEmbedded Capabilities GA relaunch (Passkey APIs going GA — covers native iOS,
native Android, and web).
What's in this PR:
main/docs/api/authentication/passkey/challenge.mdx— documentsPOST /passkey/challenge. Covers the request body (client_id,client_secret,realm,organization), prerequisites (custom domain,first-party + OIDC-conformant client, passkey grant enabled), and the
WebAuthn
PublicKeyCredentialRequestOptionsreturned inauthn_params_public_keyalongside theauth_sessionvalue used in thesubsequent token exchange.
main/docs/api/authentication/passkey/register.mdx— documentsPOST /passkey/register. Coversuser_profilesignup attributes andvalidation rules,
user_metadataconstraints (max 10 fields, reservedfield-name blocklist), and the WebAuthn
PublicKeyCredentialCreationOptionsreturned (
rp,user,pubKeyCredParams,authenticatorSelection).main/config/navigation/generated/authentication.en.json— adds a new"Passkeys" group between "Passwordless" and "Device Authorization" that
links to both new pages.
Testing
mint devfrommain/and confirm:"Passwordless" and "Device Authorization".
/passkey/challengeand/passkey/registerpages render withparameter, response field, and status code tables.
resolve.
Checklist
CONTRIBUTING.md.