question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to fetch user profile

See original GitHub issue

The passport-google-oauth module began failing earlier this month. The actual authentication seems to work, but the follow-up request for the user’s profile fails with the following error:

failed to fetch user profile (status: 401 data:

{
  "error": {
    "errors": [
      {
        "domain": "global",
        "reason": "authError",
        "message": "Invalid Credentials",
        "locationType": "header",
        "location": "Authorization"
      }
    ],
    "code": 401,
    "message": "Invalid Credentials"
  }
}

)

I have recreated a new OAuth key/secret via the Google developer console, no change in the outcome.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:11

github_iconTop GitHub Comments

28reactions
bindhyeswaricommented, Oct 22, 2015

Go to google developer console and enable the Google+ api

3reactions
peterbradencommented, Oct 16, 2015

I had this error too - passport uses the google plus API which isn’t available for google apps for enterprise.

You can fix by monkey patching:

GoogleStrategy.prototype.userProfile = function(token, done) {
  done(null, {})
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to fetch user profile NodeJs+passport-google-oAuth2 ...
When I try registering a user using Google+, I keep on getting this error message after failing to submit the request (InternalOAuthError: ...
Read more >
Error: failed to fetch user profile - Auth0 Community
Hello, I'm new to Auth0 and I am trying to implement Auth0 authentication. I am encountering an issue after I login.
Read more >
InternalOAuthError: failed to fetch user profile #24 - GitHub
If you don't want the full user profile, you can alternatively set options.skipUserProfile to true to prevent this error. 2
Read more >
internaloautherror: failed to fetch user profile - You.com
InternalOAuthError: Failed to fetch user profile is an error message that occurs when an application is attempting to authenticate a user with a...
Read more >
Oauth2 issue with passport-zendesk : Failed to fetch user profile
ERROR RuntimeError: Failed to fetch user profile err[name] InternalOAuthError err[message] Failed to fetch user profile err[oauthError] ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found