Auth0 spa 2.x returning missing_refresh_token

I have been receiving errors when calling the getTokenSilently() method. The catch block receives missing_refresh_token and login_required error most of the times.

I have useRefreshToken enabled along with rotation enabled. Leeway 180 seconds.

Here is the code from my axios middleware

const auth0 = getInstance()

try {
      const accessToken = await auth0.getTokenSilently()
      // set axios headers
      config.headers.authorization = `Bearer ${accessToken}`
 } catch (err) {
  console.log(`axios err.error`, err.error)
  if (err.error === 'login_required') {
      window.location.href = auth0.loginWithRedirect()
  } else {
      // throw err
  }
}

Can anyone help identify why am I getting those two errors?

1 Like

I use the react library with the new v2 version and I am getting missing_refresh_token errors for getAccessTokenSilently method as well.

Same issue after upgrading to v2.