Strider-CD / strider-github

Github provider for strider
25 stars 34 forks source link

OAuth issue #27

Closed tbouron closed 9 years ago

tbouron commented 9 years ago

Hi there.

I tried to setup Github with my strider installation on heroku. I create the Github app, created environment variables as per as this comment but I'm still not able to login.

Here is the error message:

500 AuthorizationError: The redirect_uri MUST match the registered callback URL for this application.

at Strategy.OAuth2Strategy.authenticate (/app/node_modules/strider-github/node_modules/passport-github/node_modules/passport-oauth2/lib/strategy.js:126:25)
at attempt (/app/node_modules/passport/lib/middleware/authenticate.js:341:16)
at authenticate (/app/node_modules/passport/lib/middleware/authenticate.js:342:7)
at callbacks (/app/node_modules/express/lib/router/index.js:164:37)
at param (/app/node_modules/express/lib/router/index.js:138:11)
at pass (/app/node_modules/express/lib/router/index.js:145:5)
at Router._dispatch (/app/node_modules/express/lib/router/index.js:173:5)
at Object.router (/app/node_modules/express/lib/router/index.js:33:10)
at next (/app/node_modules/express/node_modules/connect/lib/proto.js:193:15)
at Object.handle (/app/lib/auth.js:125:5)

And my configuration:

PLUGIN_GITHUB_HOSTNAME = https://tbouron-ci.herokuapp.com/
STRIDER_HOSTNAME = https://tbouron-ci.herokuapp.com/
SERVER_NAME = https://tbouron-ci.herokuapp.com/
Callback URL on Github app = https://tbouron-ci.herokuapp.com/auth/github/callback

Do you know what is going on?

Thanks.

tbouron commented 9 years ago

Ok, this one's on me. There is a slash a the end of hostname environment variables, that's why It didn't work. I guess it could be a good thing to add some sort of validation or auto remove for this.

Anyway, I got it working at the end, even though I faced this issue: https://github.com/Strider-CD/strider-github/issues/25