Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] - refresh_token is not returned #67

Closed
ranierimazili opened this issue Dec 20, 2019 · 2 comments
Closed

[Question] - refresh_token is not returned #67

ranierimazili opened this issue Dec 20, 2019 · 2 comments
Labels
question Further information is requested

Comments

@ranierimazili
Copy link

Hi,

I've developed an app (the code is here) but the refresh_token is never returned.
The returned object is here

Using another library (react-native-app-auth) it's returned properly.

What am I doing wrong?

@rgcjhn
Copy link

rgcjhn commented Dec 26, 2019

@ranierimazili Try adding console.log after

const tokenResponse = await client.exchange({
code,
scope: scope.toString(),
code_verifier: verifier
})
to check if there's really a refresh token returned.

@vmurin
Copy link
Owner

vmurin commented Dec 26, 2019

@GEC27 thanks for the good tip. I did not figured out, that @ranierimazili could look for the token in the response object of the authorize() function. It is not there!

@ranierimazili the refresh token is processed and saved/cached in background so you do not have it in the method response. But you also do not need it too! If you need a new access token you can just call acquireTokenSilent() and the refresh token will be used for you here.

I will close the issue now. @ranierimazili feel free to reopen if the issue still not cleared for you.

@vmurin vmurin closed this as completed Dec 26, 2019
@vmurin vmurin added question Further information is requested wontfix This will not be worked on and removed wontfix This will not be worked on labels Dec 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants