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

Auth with Github failed #56

Closed
constantx opened this issue Apr 2, 2013 · 3 comments · Fixed by #57
Closed

Auth with Github failed #56

constantx opened this issue Apr 2, 2013 · 3 comments · Fixed by #57

Comments

@constantx
Copy link
Contributor

On my local, auth with github redirected to
http://localhost:3000/auth/github/callback?code=926656513c756bf10338
with the below error.

On heroku, the auth just redirect back to /login, seems like it failed somewhere in passport.

Express
500 TypeError: Cannot read property 'name' of undefined
at ghUserLink (./lib/auth.js:39:34)
at Strategy.setupGithubAuth [as _verify] (./lib/auth.js:63:7)
at OAuth2Strategy.authenticate.params.response_type (./node_modules/passport-github/node_modules/passport-oauth/lib/passport-oauth/strategies/oauth2.js:141:20)
at Strategy.userProfile (./node_modules/passport-github/lib/passport-github/strategy.js:95:7)
at passBackControl (./node_modules/passport-github/node_modules/passport-oauth/node_modules/oauth/lib/oauth2.js:107:9)
at IncomingMessage.exports.OAuth2._executeRequest.request.on.callbackCalled (./node_modules/passport-github/node_modules/passport-oauth/node_modules/oauth/lib/oauth2.js:124:7)
at IncomingMessage.EventEmitter.emit (events.js:126:20)
at IncomingMessage._emitEnd (http.js:366:10)
at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:149:23)
at CleartextStream.socketOnData [as ondata] (http.js:1430:20)
@constantx
Copy link
Contributor Author

A closer inspection shows that the ghProfile._json doesnt have a 'plan' key. Maybe we should put a check there to make sure there's a plan in the user's object returned by github?
https://github.com/Strider-CD/strider/blob/master/lib/auth.js#L39

@niallo
Copy link
Member

niallo commented Apr 2, 2013

Thanks for the report. Yes, it looks like we need to do a check there. Ill add one.

Sent from my iPad

On Apr 2, 2013, at 8:11 AM, Truong Nguyen notifications@github.com wrote:

A closer inspection shows that the ghProfile._json doesnt have a 'plan' key. Maybe we should put a check there to make sure there's a plan in the user's object returned by github?
https://github.com/Strider-CD/strider/blob/master/lib/auth.js#L38


Reply to this email directly or view it on GitHub.

@niallo
Copy link
Member

niallo commented Apr 3, 2013

Closed by @constantx's pull request. Thank you very much!

@niallo niallo closed this as completed Apr 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants