Passport failing with 404 - InternalOAuthError for GitHub why? Passport failing with 404 - InternalOAuthError for GitHub why? express express

Passport failing with 404 - InternalOAuthError for GitHub why?


I just ran into the same problem, so here is what works for me.

Use passport-github2 and request access to the user's email address when authenticating:

passport.authenticate('github', { scope: [ 'user:email' ] }));

There are other permissions that you may want to access at the same listed in the GitHub OAuth documentation.