Not getting refresh token in production

Hello,

I have a vue app that is working beautifully with refresh tokens in dev mode on my local machine. However, when I push the app to the production server, auth0 no longer returns a refresh token. Or at least, the refresh token is not being saved in local storage like it is in the development environment.

Here is how I create the auth0 client:

export const auth0 = createAuth0({
  domain: 'MY_DOMAIN',
  clientId: 'MY_CLIENT_ID',
  cacheLocation: 'localstorage',
  useRefreshTokens: true,
  authorizationParams: {
    redirect_uri: 'MY_REDIRECT_URI',
    audience: "MY_AUDIENCE"
  },
  logoutParams: {
    returnTo: 'MY_RETURN_URI',
  }
});

Any ideas?

Hi and welcome to Auth0!

There are to things that come to my mind - can you please verify if:

  • the offline_access is included in the scope in the /authorize request once a user attempt to sign in (please navigate to your config file where scopes are specified)
  • in the Auth0 tenant → your API - if you allowed Allow Offline Access?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.