Reputation: 21314
Yesterday I could successfully login in my application via Passport.js and Passport-github module, today I received such an error:
500 failed to fetch user profile (status: 403 data: {"message":"Missing or invalid User Agent string. See http://developer.github.com/v3/#user-agent-required"})
So anyone else gets it?
Is it change in gihub oauth policy?
Do we need to contribute to this on passport-github / node-oauth modules?
Upvotes: 1
Views: 613
Reputation: 66
Just add a user-agent to your Strategy:
new GitHubStrategy({
clientID: <githubClientID>,
clientSecret: <githubClientSecret>,
callbackURL: <callback>,
customHeaders: {"User-Agent" : <your agent string>}
},
findOrCreateUserByOAuth
)
Since April, 24th, User Agent is now mandatory.
Upvotes: 5