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

Refresh token undefined #38

Closed
natanbr opened this issue Nov 14, 2017 · 2 comments
Closed

Refresh token undefined #38

natanbr opened this issue Nov 14, 2017 · 2 comments

Comments

@natanbr
Copy link

natanbr commented Nov 14, 2017

Hi,

I'm using passport to oAuth with google. In my callback after the user has logged in, although the parameters are: (request, accessToken, refreshToken, profile, done), the refreshToken is undefined while every other parameter is what it should be.
Whats wrong with the code?

This is the strategy config:

    clientID: process.env.GoogleClientID,
    clientSecret: process.env.GoogleClientSecret,
    callbackURL: process.env.GoogleCallbackURL,
    accessType: 'offline',
    prompt: 'consent',
    scope: [
      'https://www.googleapis.com/auth/drive',
      'https://www.googleapis.com/auth/userinfo.profile',
      'profile',
      'https://www.googleapis.com/auth/plus.login',
      'https://www.googleapis.com/auth/userinfo.email'],
    passReqToCallback: true

I already tried to delete all the cookies, and the app from the permissions...
https://myaccount.google.com/u/0/permissions?pli=1

Thanks for your help

@natanbr
Copy link
Author

natanbr commented Nov 15, 2017

Solution can be found here

@natanbr natanbr closed this as completed Nov 15, 2017
@Campermortey
Copy link

This did not fix it for me. Still unable to get the refresh token

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants