Users getting logged out with "Unsuccessful Refresh Token exchange, reused refresh token detected"
Maintainers usually reply within 1 day
Assessment
This issue has not been assessed yet.
Description
Checklist
- The issue can be reproduced in the react-native-auth0 sample app (or N/A).
- I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
- I have looked into the API documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Description
Our usage of Auth0 is pretty simple. After the user has been logged in we just attach the access token to network calls and verify them server side.
const useApi = (): Api => {
const { getCredentials } = useAuth0()
const backend = axios.create({ baseURL: apiUri, timeout: 10000 })
backend.interceptors.request.use(
async config => {
const credentials = await getCredentials()
config.headers["Authorization"] = `Bearer ${credentials?.accessToken}`
return config
},
async error => {}
)
}
We have gotten user reports that they get error in title. Our understanding is that this error is unrecoverable so we log the user out and force them to re-authenticate. We have a couple of thousand weekly users and this happens to maybe 2% of them.
One log id as an example:
90020251110035154104236000000000000001223372093331920555
Our top level provider:
<Auth0Provider domain={domain} clientId={clientId}>
<Main />
</Auth0Provider>
Reproduction
Seems to happen randomly, a few times a week for affected users. So far we've only seen it on iOS.
Additional context
A similar issue happens when we use the react version, for both MacOS, iOS, and Windows devices. We allow overlap for expiring refresh tokens (120 seconds). Our refresh token are set to last one year, and we're currently seeing this multiple times a week for users.
react-native-auth0 version
5.1.0
React Native version
0.81.4
Expo version
Not using expo
Platform
iOS
Platform version(s)
Multiple
- Dominant language
- TypeScript
- Stars
- 553
- Forks
- 244
- Avg merge
- 19h
- Merged PRs (30d)
- 39
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from auth0/react-native-auth0
-
feature request
Difficulty 4/5 3-5 days Newbie friendliness 52/100
auth0/react-native-auth0#1735 ·
Maintainers usually reply within 1 day
-
feature request
Difficulty 5/5 Over a week Newbie friendliness 45/100
auth0/react-native-auth0#1458 · 8 comments · 3 reactions ·
Maintainers usually reply within 1 day
All issues in auth0/react-native-auth0
Similar issues
-
`@angular/[email protected]` depends on vulnerable Vite 7.3.7 - GHSA-p4f5-76q4-ffq7 (Critical RCE)Openarea: @angular/build
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
angular/angular-cli#34764 ·
Maintainers usually reply within 1 day
-
status/need-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
google-gemini/gemini-cli#30384 · 1 comment ·
Maintainers usually reply within 1 day
-
P2
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
bug ready-for-human
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
LucasSantana-Dev/Lucky#3150 ·
Maintainers usually reply within 1 day
-
enhancement good first issue priority: low size: XS
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day