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

Error without any desctiption #122

Open
tkhatibi opened this issue Feb 22, 2017 · 4 comments
Open

Error without any desctiption #122

tkhatibi opened this issue Feb 22, 2017 · 4 comments

Comments

@tkhatibi
Copy link

tkhatibi commented Feb 22, 2017

I get bellow error after redirect to my callback URL

Error
   at /media/tooraj/0AD25B25D25B1473/Users/2raj/Documents/Programming/node/- tickman/tickman-fullstack/node_modules/passport-google-oauth20/lib/strategy.js:95:21
   at passBackControl (/media/tooraj/0AD25B25D25B1473/Users/2raj/Documents/Programming/node/- tickman/tickman-fullstack/node_modules/oauth/lib/oauth2.js:132:9)
   at IncomingMessage.<anonymous> (/media/tooraj/0AD25B25D25B1473/Users/2raj/Documents/Programming/node/- tickman/tickman-fullstack/node_modules/oauth/lib/oauth2.js:157:7)
   at emitNone (events.js:91:20)
   at IncomingMessage.emit (events.js:185:7)
   at endReadableNT (_stream_readable.js:974:12)
   at _combinedTickCallback (internal/process/next_tick.js:74:11)
   at process._tickCallback (internal/process/next_tick.js:98:9)
@LuukMoret
Copy link

I also had this problem and the solution was to enable the Google+ API in the Google Developers Console

@AaronNGray
Copy link

AaronNGray commented Apr 13, 2017

I am getting the same thing and also on passport-google-oauth2 jaredhanson/passport-google-oauth2#24

The Error shows up as InternalOAuthError: failed to fetch user profile on v6.10.2 LTS but jus as Error on v7.8.0 Current.

@AaronNGray
Copy link

It looks like the behaviour of the Google API has changed maybe due to authentification security changes .

@bvodola
Copy link

bvodola commented Dec 7, 2017

I'm using

"passport": "^0.4.0",
"passport-google-oauth20": "^1.0.0"

I followed @LuukMoret's suggestion but still wasn't able to make it work. So, in addition to adding the Google + API in the developer console, I added the following scope to the passport.authenticate scope array:

https://www.googleapis.com/auth/plus.login

Like this:

router.get('/google', 
  passport.authenticate('google', { scope: [
    'https://www.googleapis.com/auth/calendar',
    'https://www.googleapis.com/auth/plus.login'
]}));

And then it worked! =D

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

4 participants