Need refresh token

Which SDK this is regarding: react-native-auth0
SDK Version: 2.10.0
Platform Version: “react”: “17.0.2”, “react-native”: “0.65.1”,

New in the auth0 community, I tried to get Refresh and Access tokens from a React Native application.
I followed the examples, I have the access token but that’s all.
Searching in the forum, I found that I need to enable “Offline Access”, but it is not possible when we use “management API”…
I don’t know if I used the “management API” or not, I’ve just follow the example, I use the SDK for React Native, i have the following code and I have just the access token :

const resp = await auth0.webAuth
.authorize({scope: ‘openid profile email’})
.then(credentials => {
console.log('AUTHENTICATED! accessToken = ’ + credentials.accessToken);

How can I use another thing that the “management API”?
Thanks by advance

I found a solution, with a lot of luck.
I’ve just try to add “offline_access” in the scope parameter of the authorize function like this:

.authorize({scope: ‘openid profile email offline_access’})

I have now the refresh token in the response.

It should be great to be somewhere in the documentation, I think. :slightly_smiling_face:


Perfect! Glad you have figured it out! I’ll make sure to relay that feedback to our Docs team. Thanks!