diff --git a/EXAMPLES.md b/EXAMPLES.md index 0637ee52..7242d22b 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -9,6 +9,7 @@ - [Use with Auth0 organizations](#use-with-auth0-organizations) - [Protecting a route with a claims check](#protecting-a-route-with-a-claims-check) - [Device-bound tokens with DPoP](#device-bound-tokens-with-dpop) +- [Using Multi Resource Refresh Tokens]() ## Use with a Class Component @@ -571,3 +572,28 @@ createFetcher({ }) }); ``` + +## Using Multi-Resource Refresh Tokens + +With **Multi-Resource Refresh Tokens** -or simply **MRRT**- now a refresh token from one API, can be used to request a new access token from another different API. Read more about how MRRT works for browser-based applications to help you decide, wether you need or not, to use this functionality. + +- [Multi-Resource Refresh Token](https://auth0.com/docs/secure/tokens/refresh-tokens/multi-resource-refresh-token) + +## Enabling MRRT + +MRRT is disabled by default. To enable it, set the `useMrrt` option to `true` when invoking the provider. You will need to set `useRefreshTokens` and `useRefreshTokensFallback` to `true` as well For example: + +```jsx + +``` + +> [!IMPORTANT] +> In order MRRT to work, it needs a previous configuration setting the refresh token policies. +> Visit [configure and implement MRRT.](https://auth0.com/docs/secure/tokens/refresh-tokens/multi-resource-refresh-token/configure-and-implement-multi-resource-refresh-token) diff --git a/package-lock.json b/package-lock.json index 26da44bd..0a897a2a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "2.5.0", "license": "MIT", "dependencies": { - "@auth0/auth0-spa-js": "^2.4.1" + "@auth0/auth0-spa-js": "^2.5.0" }, "devDependencies": { "@rollup/plugin-node-resolve": "^15.0.1", @@ -74,9 +74,10 @@ } }, "node_modules/@auth0/auth0-spa-js": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@auth0/auth0-spa-js/-/auth0-spa-js-2.4.1.tgz", - "integrity": "sha512-GE1XPLEgEUeqYBw5VcA52+3ubJDh4VKZFqdu0mr6h7anu+rFZb389cDbfpW145I23T1knZB/jvQtuRrkcLuT+Q==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@auth0/auth0-spa-js/-/auth0-spa-js-2.5.0.tgz", + "integrity": "sha512-4Xvx2E4N2Airr1Rp+KOejdDbpj5LnfLtNZ/TaOdo7VbRGmpWAYkyGFcF9BBQSQ10rGhFn/GaBHIZECyskruAfg==", + "license": "MIT", "dependencies": { "browser-tabs-lock": "^1.2.15", "dpop": "^2.1.1", diff --git a/package.json b/package.json index dae4b546..52220b29 100644 --- a/package.json +++ b/package.json @@ -95,6 +95,6 @@ "react-dom": "^16.11.0 || ^17 || ^18 || ^19" }, "dependencies": { - "@auth0/auth0-spa-js": "^2.4.1" + "@auth0/auth0-spa-js": "^2.5.0" } }