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

InternalOAuthError: Failed to fetch user profile #48

Closed
MaximeHeckel opened this issue Sep 2, 2015 · 12 comments
Closed

InternalOAuthError: Failed to fetch user profile #48

MaximeHeckel opened this issue Sep 2, 2015 · 12 comments

Comments

@MaximeHeckel
Copy link

While putting my app that uses passport Github on production I got this issue:

InternalOAuthError: Failed to fetch user profile
    at /app/node_modules/passport-github2/lib/strategy.js:98:19
    at passBackControl (/app/node_modules/passport-github2/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:123:9)
    at IncomingMessage.<anonymous> (/app/node_modules/passport-github2/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:142:7)
    at IncomingMessage.emit (events.js:129:20)
    at IncomingMessage.wrapped (/app/node_modules/newrelic/lib/transaction/tracer/index.js:157:28)
    at IncomingMessage.wrappedEmit [as emit] (/app/node_modules/newrelic/lib/transaction/tracer/index.js:201:46)
    at _stream_readable.js:908:16
    at wrapped (/app/node_modules/newrelic/lib/transaction/tracer/index.js:157:28)
    at process._tickDomainCallback (node.js:381:11)
    at process.wrappedFunction (/app/node_modules/newrelic/lib/transaction/tracer/index.js:271:51)

I can reach the github login page but it failed during the callback and gives me an Internal Server Error.
The app is well configured (clientID, clientSecret and callback url) plus I can't reproduce that on local.
Here are my scopes : { scope: ['read:org', 'user:email'] }

Any idea from where it can come from?

(I also tried passport github2, same issue)

@MaximeHeckel
Copy link
Author

This was a credential issue

@RinkAttendant6
Copy link

Can you please elaborate on how you solved the problem as I am running into the same issue

@MaximeHeckel
Copy link
Author

The person in charge on putting the app online just used the wrong credentials.
To elaborate he copied pasted the client id twice (once for the client id and once for the client secret). Thus the issue. Most of the time this is due to the use of wrong or invalid credentials as far as I know

@RinkAttendant6
Copy link

I'm glad I wasn't the only one who made that exact same mistake. Thanks 😃

@HuangStanley050
Copy link

Hi, just wondering if anyone has experienced the same issue again. I ran into this and after double checking the clientID and clientSecret, still not able to resolve. Any help or suggestion is appreciated.

@kamescg
Copy link

kamescg commented Jul 10, 2020

I am having similar issues @HuangStanley050 that started popping up recently.

GIthub seems to have started to undergo a lot of changes since joining Microsoft and perhaps the OAUTH setup is having issues, because I have seen it reported several places recently (something to do with DNS for the ISP... which seems really odd)

Are you still having issues? Does it happen often?

@HuangStanley050
Copy link

I haven't tried again but unfortunately, it never seemed to have worked for me

@Doradx
Copy link

Doradx commented Aug 2, 2020

I haven't tried again but unfortunately, it never seemed to have worked for me

Please check the network connection between your host and Github.
Changing the static address of Github in the hosts file works for me.

@LordJohn42
Copy link

Guys, i created github app instead of github OAuth app. Be focus. :)

@CyberCitizen01
Copy link

):( Spent 2 hours searching for the solution...!!
Turns out there was a typo in my variable name for secrets as compared to the one in my .env file

@cubasia
Copy link

cubasia commented Jul 26, 2022

Hi , I am experimenting the same problem, I double check the credentials, and i have a good connection but nothing.
I also downloaded the last github source from passoport as example and it doesn't not work even !

Any clue ?

@sabinasiddiqi
Copy link

I am having the same problem with user auth using a github app (not oauth app) - the rest of the user auth flow seems to be successful - just the last step fetching the user profile...

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

9 participants