Open AaronNGray opened 7 years ago
Did you set the "profile" scope in the strategy options? If you don't want the full user profile, you can alternatively set options.skipUserProfile to true to prevent this error.
+1 the same error. I enabled Google+ API too.
I got:
InternalOAuthError: failed to fetch user profile at /home/longnv/workspace/sm1/node_modules/passport-google-oauth2/lib/oauth2.js:92:28 at passBackControl (/home/longnv/workspace/sm1/node_modules/oauth/lib/oauth2.js:132:9) at IncomingMessage.
(/home/longnv/workspace/sm1/node_modules/oauth/lib/oauth2.js:157:7) at IncomingMessage.emit (events.js:185:15) at endReadableNT (_stream_readable.js:1101:12) at process._tickCallback (internal/process/next_tick.js:114:19)
did anyone ever figure out how to fix this?
using these scopes fixed my error:
scope: ['https://www.googleapis.com/auth/plus.login',
'https://www.googleapis.com/auth/userinfo.email']
using these scopes fixed my error:
scope: ['https://www.googleapis.com/auth/plus.login', 'https://www.googleapis.com/auth/userinfo.email']
I am new to this, where to implement this please?
I have the same things going on
I have same issue
Hi @zulfikar4568 , by any chance did you manage to find a solution for this problem ?
It seems that updating node version fixed the issue.
using this userProfileURL: "https://www.googleapis.com/oauth2/v3/userinfo" solved my problem as google plus api is now deprecated
It seems that updating node version fixed the issue.
Hey, could you please explain exactly to which version we have to update? I am seeing the same error.
Hey, did anyone find the solution to this problem? Above things not working for me. I am using passport-google-oauth20 - version 2
It seems that updating node version fixed the issue.
Thanks, man! It worked.
If anyone got the answer of the problem, please help...
Have you tried the two solutions in this thread ?
On Wed, 9 Aug 2023 at 14:30, Ashish Kumar @.***> wrote:
If anyone got the answer of the problem, please help...
— Reply to this email directly, view it on GitHub https://github.com/jaredhanson/passport-google-oauth2/issues/24#issuecomment-1671332565, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAU4E6OWRK5S57IZ7LIQDDXUOGITANCNFSM4DGTUVLQ . You are receiving this because you authored the thread.Message ID: @.***>
-- Aaron Gray - @@.***
Independent Open Source Software Engineer, Computer Language Researcher, Information Theorist, and Computer Scientist.
I also faced this problem today. For my case: cleaned node_modules, install node 18.17 LTS and reinstall all packages solved it.
Thanks for your support, I have mistakenly done a typo error 😅 .
On Wed, Aug 9, 2023, 9:34 PM minhhn2910 @.***> wrote:
I also faced this problem today. For my case: cleaned node_modules, install node 18.17 LTS and reinstall all packages solved it.
— Reply to this email directly, view it on GitHub https://github.com/jaredhanson/passport-google-oauth2/issues/24#issuecomment-1671718157, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7WA2YQGGTYAWMN6MQEMAVDXUOYJFANCNFSM4DGTUVLQ . You are receiving this because you commented.Message ID: @.***>
add "openid" in scope, it will work
passport.use(new LinkedinStrategy({ clientID: process.env.LINKEDIN_CLIENT_ID, clientSecret: process.env.LINKEDIN_CLIENT_SECRET, callbackURL: "http://localhost:3000/auth/linkedin/callback", scope: ['email','profile','openid'],
},
add "openid" in scope, it will work
passport.use(new LinkedinStrategy({ clientID: process.env.LINKEDIN_CLIENT_ID, clientSecret: process.env.LINKEDIN_CLIENT_SECRET, callbackURL: "http://localhost:3000/auth/linkedin/callback", scope: ['email','profile','openid'],
},
Thanks, it Worked...
Using both https://github.com/mjhea0/passport-examples and https://github.com/barberboy/passport-google-oauth2-example I am getting the following error :-
InternalOAuthError: failed to fetch user profile at C:\Users\aaron\Tests\JavaScript\Facebook\passport-examples\node_modules\passport-google-oauth2\lib\oauth2.js:92:28 at passBackControl (C:\Users\aaron\Tests\JavaScript\Facebook\passport-examples\node_modules\oauth\lib\oauth2.js:132:9) at IncomingMessage. (C:\Users\aaron\Tests\JavaScript\Facebook\passport-examples\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)