passport-google-oauth: Authorization error

I’m getting an error with OAuth 2.0 when Passport is trying to fetch the user profile.

500 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" } } )

About this issue

  • Original URL
  • State: closed
  • Created 12 years ago
  • Comments: 15

Commits related to this issue

Most upvoted comments

Fixed this by specifying the following scope:

{ scope: 'https://www.google.com/m8/feeds https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile'}

It would be good if this module automatically appended the https://www.googleapis.com/auth/userinfo.profile scope since it always needs it for profile.