inch-ci / inch_ci-web

Web frontend for Inch CI
http://inch-ci.org/
MIT License
139 stars 20 forks source link

Infinite loop when signing in with Github #182

Closed scambra closed 7 years ago

scambra commented 7 years ago

I tried to sign with Github, so I get webhook added and I can edit my projects, but I get an infinite loop:

  1. Loads https://inch-ci.org/auth/github
  2. Redirects to https://github.com/login/oauth/authorize?client_id=...&redirect_uri=http%3A%2F%2Finch-ci.org%2Fauth%2Fgithub%2Fcallback&response_type=code&scope=user%3Aemail%2Cwrite%3Arepo_hook%2Cread%3Aorg&state=...
  3. Redirects to https://inch-ci.org/auth/github/?error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.&error_uri=https%3A%2F%2Fdeveloper.github.com%2Fv3%2Foauth%2F%23redirect-uri-mismatch&state=...
  4. Redirects again to https://github.com/login/oauth/authorize
dannytech commented 7 years ago

Same here, and based off the URL described in 3., it appears the callback URL Inch requests isn't registered for the GitHub application.

sheharyarn commented 7 years ago

Yep, same here. This is a serious issue, blocking everyone from logging in. I don't think this can be fixed by sending in a pull request unless we know what callback url github expects, right?

dannytech commented 7 years ago

My guess is the callback URL was removed accidentally from GitHub, and just needs to be added back.

rrrene commented 7 years ago

@dannytech @sheharyarn I get the frustration. The app is giving the wrong redirect_uri to GitHub (GitHub has the correct one configured), but I have not yet figured out why this is.

rrrene commented 7 years ago

@dannytech @sheharyarn I could not figure out where the wrong redirect came from, so I wrote a nasty webserver-rule to turn that request into the correct one.

It should work now. Please try!