Skip to content

Commit aa5b047

Browse files
committed
fix: new instructions for MRRT
1 parent 5ab1710 commit aa5b047

File tree

2 files changed

+8
-46
lines changed
  • call-apis-on-users-behalf/others-api

2 files changed

+8
-46
lines changed

call-apis-on-users-behalf/others-api/langchain-react-spa-js/README.md

Lines changed: 4 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -131,51 +131,10 @@ Auth0's Token Vault enables the LangGraph API to exchange a SPA's access token f
131131
5. **Define a Multi-Resource Refresh Token policy for your SPA Application**
132132
- After your SPA Application has been granted access to the My Account API, you will also need to leverage the [Multi-Resource Refresh Token](https://auth0.com/docs/secure/tokens/refresh-tokens/multi-resource-refresh-token) feature, where the refresh token delivered to your SPA will allow it to obtain an access token to call My Account API.
133133
- This will require defining a new [refresh token policy](https://auth0.com/docs/secure/tokens/refresh-tokens/multi-resource-refresh-token/configure-and-implement-multi-resource-refresh-token) for your SPA Application where the `audience` is `https://<your auth0 domain>/me/` and the `scope` should include at least the `"create:me:connected_accounts"` scope.
134-
- The documentation page explains how to achieve this using various tools, but here is an example showing how to do it with `curl`:
135-
136-
```shell
137-
curl --request PATCH \
138-
--url 'https://{yourDomain}/api/v2/clients/{yourClientId}' \
139-
--header 'authorization: Bearer {yourMgmtApiAccessToken}' \
140-
--header 'content-type: application/json' \
141-
--data '{
142-
"refresh_token": {
143-
"expiration_type": "expiring",
144-
"rotation_type": "rotating",
145-
"token_lifetime": 31557600,
146-
"idle_token_lifetime": 2592000,
147-
"leeway": 0,
148-
"infinite_token_lifetime": false,
149-
"infinite_idle_token_lifetime": false,
150-
"policies": [
151-
{
152-
"audience": "https://{yourDomain}/me/",
153-
"scope": [
154-
"create:me:connected_accounts"
155-
]
156-
}
157-
]
158-
}
159-
}'
160-
```
161-
Where:
162-
- `{yourDomain}` is your Auth0 domain (e.g., `dev-abc123.us.auth0.com`).
163-
- `{yourClientId}` is the Client ID of your SPA application.
164-
- `{yourMgmtApiAccessToken}` is a Management API access token with the `update:clients` scope.
165-
-
166-
<details>
167-
168-
<summary>How to get a Management API Token from the Dashboard</summary>
169-
170-
To create a token exchange profile, you need a Management API access token with the appropriate scopes.
171-
172-
The quickest way to get a token for testing is from the Auth0 Dashboard:
173-
* Navigate to Applications > APIs in your Auth0 Dashboard
174-
* Select Auth0 Management API
175-
* Click on the API Explorer tab
176-
* Copy the displayed token
177-
178-
</details>
134+
- Setup steps:
135+
- In your Auth0 Dashboard, go to Applications, and open the Settings for your SPA application created at step 1.
136+
- Under the "Multi-Resource Refresh Token" section, click "Edit Configuration".
137+
- Enable MRRT for "Auth0 My Account API".
179138

180139
6. **Configure a Social Connection for Google in Auth0**:
181140
- Make sure to enable the "Use for Connected Accounts with Token Vault" toggle

call-apis-on-users-behalf/others-api/vercel-react-spa-js/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ You will need the following prerequisites to run this app:
8484
5. Define a Multi-Resource Refresh Token policy for your SPA Application:
8585
- After your SPA Application has been granted access to the My Account API, you will also need to leverage the [Multi-Resource Refresh Token](https://auth0.com/docs/secure/tokens/refresh-tokens/multi-resource-refresh-token) feature, where the refresh token delivered to your SPA will allow it to obtain an access token to call My Account API.
8686
- This will require defining a new [refresh token policy](https://auth0.com/docs/secure/tokens/refresh-tokens/multi-resource-refresh-token/configure-and-implement-multi-resource-refresh-token) for your SPA Application where the `audience` is `https://<your auth0 domain>/me/` and the `scope` should include at least the `"create:me:connected_accounts"` scope.
87-
- The documentation page explains how to achieve this using various tools, but here is an example showing how to do it with `curl`:
87+
- Setup steps:
88+
- In your Auth0 Dashboard, go to Applications, and open the Settings for your SPA application created at step 1.
89+
- Under the "Multi-Resource Refresh Token" section, click "Edit Configuration".
90+
- Enable MRRT for "Auth0 My Account API".
8891

8992
```shell
9093
curl --request PATCH \

0 commit comments

Comments
 (0)