-
-
Notifications
You must be signed in to change notification settings - Fork 327
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
Refresh token not returned even with accessType: 'offline', and approvalPrompt: 'force' #115
Comments
Response here : #23 |
@Nico-Nico-FR this doesn't seem to be the same issue we're talking about here. In my code above you can see that accessType and aprovalPrompt are set in passport.authenticate, just as the solution in the old linked question shows. I've confirmed that adding the "session: false" to the passport.authenticate argument object does not cause a refresh token to return. I think this is still a standing issue. |
I'm also facing the same problem recently. Previously I'm able to get refresh token with the said parameters with or without session: false |
BTW I figured out that this is a chrome issue because the confirmation page doesn't show in chrome. I've tested in Firefox, and I'm getting the refresh token. related to: jaredhanson/passport-google-oauth2#4 Edit: I got excited too soon. It doesn't work in firefox as well. |
Seems like approvalPrompt no longer works. Now I'm using prompt: 'consent' and it works. |
@cyan198 Thank you for tips, is it well working on my side ! |
@cyan198 Thanks! This worked great. |
@cyan198 I'm way late to this chain but thank you so much! I think chrome just did an update and having the "approvalPrompt:force" suddenly doesn't work anymore. But the prompt:consent does. I can't find any of this documented anywhere either :/. You're my hero |
I am not receiving a refresh token, even with the parameters set as below. All other stackoverflow answers and closed issues seem to have had issues involving them not having syntax similar to below, so raising this as a new issue.
This code:
passport.authenticate('google', { scope: ["profile email https://www.googleapis.com/auth/calendar"], accessType: 'offline', approvalPrompt: 'force'}),
returns in the CB:
the access and refresh tokens are: ya29.CjLhArlZ3nRKqHdttUwrtYey4iS1P84cX59u0httnSACnk9NS1V-SRE0_SiQmZ9rpSbEuw undefined
The text was updated successfully, but these errors were encountered: