Commit 72a0c44
authored
Implement MRRT (#906)
By submitting a PR to this repository, you agree to the terms within the
[Auth0 Code of
Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md).
Please see the [contributing
guidelines](https://github.com/auth0/.github/blob/master/CONTRIBUTING.md)
for how to create and submit a high-quality PR for this repo.
### Description
In this PR, `auth0-spa-js` has been updated to allow `auth0-react` to
use [Multi-Resource Refresh Tokens
(MRRT)](https://auth0.com/docs/secure/tokens/refresh-tokens/multi-resource-refresh-token).
An example of configuring the Auth0Provider to use MRRT has also been
provided.
### Testing
- [Configure
MRRT](https://auth0.com/docs/secure/tokens/refresh-tokens/multi-resource-refresh-token/configure-and-implement-multi-resource-refresh-token).
- In your react testing application, add `useMrrt`, `useRefreshTokens`
and `useRefreshTokensFallback` to `true`, following the example on
`EXAMPLE.MD`.
- Get a token for audience 1.
- Try to get a token for audience 2 using the refresh token from
audience 1.
- [x] This change adds test coverage for new/changed/fixed functionality
### Checklist
- [x] I have added documentation for new/changed functionality in this
PR or in auth0.com/docs
- [x] All active GitHub checks for tests, formatting, and security are
passing
- [x] The correct base branch is being used, if not the default branch1 parent 230ec34 commit 72a0c44
3 files changed
+32
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
571 | 572 | | |
572 | 573 | | |
573 | 574 | | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
0 commit comments