Users getting logged out with "Unsuccessful Refresh Token exchange, reused refresh token detected"

Open
#1,374 50 comments 2 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@subhankarmaiti is already working on this.

Since Dec 16, 2025.

  • #1738 by @subhankarmaiti — merged

Assessment

This issue has not been assessed yet.

Description

bug
Checklist
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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from auth0/react-native-auth0

All issues in auth0/react-native-auth0

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.