Open tkhatibi opened 7 years ago
I also had this problem and the solution was to enable the Google+ API in the Google Developers Console
I am getting the same thing and also on passport-google-oauth2 https://github.com/jaredhanson/passport-google-oauth2/issues/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.
It looks like the behaviour of the Google API has changed maybe due to authentification security changes .
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
I get bellow error after redirect to my callback URL