How to retrieve refresh token using React Native SDK

Please include the following information in your post:

  • Which SDK this is regarding: e.g. react-native-auth0
  • Platform Version: React Native

Using the React Native SDK, how can we retrieve the refresh_token for a user that has just logged in using the auth.authorize action?

Hi @marbaez,

To get refresh tokens, you must include the offline_access scope.

It appears to be supported by that SDK. Can you try adding it to your existing scopes and see if the response includes a refresh token?

For example:

auth0.webAuth
  .authorize({scope: 'openid email profile offline_access})
  .then(credentials => console.log(credentials))
  .catch(error => console.log(error));

This doc explains what is happening when you pass this scope:

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