Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions EXAMPLES-WEB.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,3 +282,9 @@ const credentials = await auth0.mfa.verify({
The web platform supports direct authentication grants including `auth.passwordRealm()`, `auth.createUser()`, `auth.resetPassword()`, and the MFA Flexible Factors Grant. These methods make direct HTTP calls to the Auth0 API.

Token refresh is handled automatically by `credentialsManager.getCredentials()` on the web. The `auth.refreshToken()` method is not available.

### My Account API (Web)

The [My Account API](./EXAMPLES.md#my-account-api) is supported on the web platform. The `auth0.myAccount` client works the same way as on native, so the examples in [EXAMPLES.md](./EXAMPLES.md#my-account-api) apply. Passkey enrollment on the web uses the browser's [WebAuthn](https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API) APIs instead of a native passkey module.

When DPoP is enabled (the default), a My Account call on the web only succeeds when the supplied access token was issued by the same client instance, because the DPoP proof is signed with that client's keypair. When the client is not configured with DPoP, plain bearer tokens are used and any valid access token works.
3 changes: 3 additions & 0 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -1497,11 +1497,14 @@ The My Account API allows authenticated users to manage their own authentication

Access the My Account client via the `myAccount` property from `useAuth0()` or the `Auth0` class instance.

The My Account API is supported on Native (iOS/Android) and Web. The same `myAccount` API is used on all platforms; only the passkey credential ceremony differs (native passkey module vs. the browser's WebAuthn APIs). On Web, when DPoP is enabled (the default), the supplied access token must have been issued by the same client instance, since the DPoP proof is signed with that client's keypair; when the client is not configured with DPoP, plain bearer tokens are used and any valid access token works.

### Prerequisites

- A [custom domain](https://auth0.com/docs/customize/custom-domains) must be configured on your Auth0 tenant
- **iOS**: Associated Domains entitlement must be configured with `webcredentials:<your-custom-domain>` for passkey support
- **Android**: App Links must be set up with your custom domain via an `assetlinks.json` file for passkey support
- **Web**: passkey enrollment uses the browser's [WebAuthn](https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API) APIs; no additional platform setup is required
- The user must be authenticated
- An access token with the appropriate My Account API scopes is required:
- `read:me:authentication_methods`
Expand Down
71 changes: 41 additions & 30 deletions README.md

Large diffs are not rendered by default.

Loading
Loading