umap icon indicating copy to clipboard operation
umap copied to clipboard

Log-In via GitHub fails with 404 because the redirect URI does not match the registered callback URL

Open vonneudeck opened this issue 3 years ago • 5 comments

When I try to log in via Github I get a 404 with this beautiful speaking URI

http://umap.openstreetmap.fr/complete/?error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.&error_uri=https%3A%2F%2Fdocs.github.com%2Fapps%2Fmanaging-oauth-apps%2Ftroubleshooting-authorization-request-errors%2F%23redirect-uri-mismatch&state=uV2F28VIreaQnh51EpkB8Dxmj7wlyf3Z

It works if I visit umap without TLS. How about enforcing https? It is anyway what should be done.

vonneudeck avatar Nov 13 '20 21:11 vonneudeck

I just got bitten by this too. I had created some maps using my github account and couldn't figure out how to login to it.

I suspect the config for github auth is broken (assumes http and fails for https).

This is the URL I get sent to:

http://umap.openstreetmap.fr/complete/?error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.&error_uri=https%3A%2F%2Fdocs.github.com%2Fapps%2Fmanaging-oauth-apps%2Ftroubleshooting-authorization-request-errors%2F%23redirect-uri-mismatch&state=igYXxodyWeEvbpiYB3pqtG0nCX6eXBIP

donalhunt avatar May 31 '21 14:05 donalhunt

This is probably a misconfiguration on the github side (only supports redirects to the http url) and needs to be resolved by the service owner.

flow is:

  1. https://umap.openstreetmap.fr/login/github/
  2. https://github.com/login/oauth/authorize?client_id=XXXXXX&redirect_uri=https://umap.openstreetmap.fr/complete/github/&state=XXXX&response_type=code&scope=user:email
  3. http://umap.openstreetmap.fr/complete/?error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.&error_uri=https%3A%2F%2Fdocs.github.com%2Fapps%2Fmanaging-oauth-apps%2Ftroubleshooting-authorization-request-errors%2F%23redirect-uri-mismatch&state=XXXXXXX

donalhunt avatar May 31 '21 14:05 donalhunt

https://github.com/omab/django-social-auth/issues/600 seems to be a very similar issue but is over 8 years old.

donalhunt avatar May 31 '21 14:05 donalhunt

Stupid bug. I cannot login into my account.

Wikinaut avatar Mar 31 '22 21:03 Wikinaut

Still got this problem. I can no longer loginto my account.

Edit: Switching to HTTP works, but this needs to be fixed.

TheTechRobo avatar Oct 09 '22 01:10 TheTechRobo

We have modified the app on the Github side to handle the HTTPS. 🎉

davidbgk avatar May 15 '23 22:05 davidbgk

Finally it works.

Wikinaut avatar May 15 '23 22:05 Wikinaut

There are different issues now. I will file new issues since they are different to this one. 😥

donalhunt avatar May 15 '23 22:05 donalhunt

For what I can see, we have the opposite issue: it only work when umap is https now, and does not work when it's http. Certainly time to force https everywhere, but #205 and #594

yohanboniface avatar May 16 '23 07:05 yohanboniface