umap icon indicating copy to clipboard operation
umap copied to clipboard

404 on login

Open kieppie opened this issue 8 years ago • 14 comments

when logging in to http://umap.openstreetmap.fr/en/, get a 404 when logging via GitHub ID

kieppie avatar Jul 25 '17 23:07 kieppie

Try with https://umap.openstreetmap.fr/en/.

yohanboniface avatar Jul 26 '17 05:07 yohanboniface

nope. redirects 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%2Fdeveloper.github.com%2Fv3%2Foauth%2F%23redirect-uri-mismatch&state=$SOMEHASH

kieppie avatar Jul 26 '17 22:07 kieppie

Still broken for me.

stevage avatar Sep 12 '17 12:09 stevage

Still working for me ;)

I'll need more details to be able to help. Also check out your browser extensions.

yohanboniface avatar Sep 12 '17 12:09 yohanboniface

Ah, that's interesting. In Chrome incognito mode (disables most extensions) it worked. So yeah, presumably one of my extensions is doing...something.

stevage avatar Sep 12 '17 12:09 stevage

Huh, actually no. Disabling all my extensions didn't work. But if I log out of Github, then uMap's Github login page works (it shows the login screen and I can log in), but as soon as the login completes, it goes to the 404 page. (Same in incognito mode).

What other info would help debug this?

In Firefox, it works for me. Chrome 60.0.3112.113

stevage avatar Sep 12 '17 12:09 stevage

I don't have Chrome, but it works with Chromium 61.0.3163.79 (Developer Build) (64-bit) here (and Firefox, my usual browser).

Can you paste the final 404 URL?

yohanboniface avatar Sep 12 '17 12:09 yohanboniface

https://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%2Fdeveloper.github.com%2Fv3%2Foauth%2F%23redirect-uri-mismatch&state=0ZoEOHoz8lkcqMXSbn1G8PB7YhOXeZmm

stevage avatar Sep 12 '17 12:09 stevage

Can you log out from Github, click on Github icon on uMap, and copy-paste the URL you ends with on Github (before filling any form)?

yohanboniface avatar Sep 12 '17 13:09 yohanboniface

https://github.com/login?client_id=c976781d7d009804978f&return_to=%2Flogin%2Foauth%2Fauthorize%3Fclient_id%3Dc976781d7d009804978f%26redirect_uri%3Dhttps%253A%252F%252Fumap.openstreetmap.fr%252Fcomplete%252Fgithub%252F%253Fredirect_state%253D0ZoEOHoz8lkcqMXSbn1G8PB7YhOXeZmm%26response_type%3Dcode%26scope%3Duser%253Aemail%26state%3D0ZoEOHoz8lkcqMXSbn1G8PB7YhOXeZmm

That's kind of interesting, because URL decoded it turns into:

https://github.com/login?client_id=c976781d7d009804978f&return_to=/login/oauth/authorize?client_id=c976781d7d009804978f&redirect_uri=https%3A%2F%2Fumap.openstreetmap.fr%2Fcomplete%2Fgithub%2F%3Fredirect_state%3D0ZoEOHoz8lkcqMXSbn1G8PB7YhOXeZmm&response_type=code&scope=user%3Aemail&state=0ZoEOHoz8lkcqMXSbn1G8PB7YhOXeZmm

and if that is decoded, it turns into:

https://github.com/login?client_id=c976781d7d009804978f&return_to=/login/oauth/authorize?client_id=c976781d7d009804978f&redirect_uri=https://umap.openstreetmap.fr/complete/github/?redirect_state=0ZoEOHoz8lkcqMXSbn1G8PB7YhOXeZmm&response_type=code&scope=user:email&state=0ZoEOHoz8lkcqMXSbn1G8PB7YhOXeZmm

I don't know if double URL encoding is intentional.

The final umap redirect page is thus:

https://umap.openstreetmap.fr/complete/?code=07ae8101f1a4d6d6811d

which is thus where the 404 comes from.

stevage avatar Sep 14 '17 02:09 stevage

Yes, double encoding is expected: it's a URL passed as parameter.

Sounds like the usual http/https story. Sadly it's not easy to force https on umap, because this will prevent user to use non https URLs for icons or remote data or import data, which is not very friendly, given the scope of uMap which is something like "make map easy for non technical people".

So try with http:// instead of https://, and if it does not work, it may be that Chrome is forcing you to use https, which is for good, but it's not always good.

yohanboniface avatar Sep 14 '17 07:09 yohanboniface

Hit with the same issue. I can confirm this is due to http/https mismatch.

  • Clicking the github link from https://umap.openstreetmap.fr/en/ gives a 404 (with the URL mismatch message in the url)
  • Clicking the github link from http://umap.openstreetmap.fr/en/ works.

In both cases I was already logged in on github. So as a workaround, loading the http page helps. And login is still secure since it redirects to https right away.

Running Chromium 59.0.3071.109, though I doubt that's related.

spectras avatar Sep 30 '17 13:09 spectras

For the reference, I can confirm that the issue is still valid today when using the GitHub identification. (Firefox Nightly, with DuckDuckGo Privacy Essentials which enforces HTTPS when available). Disabling the extension and going to the HTTP variant allows to log in.

akien-mga avatar Jun 01 '18 08:06 akien-mga

It's still the case today - having found this issue, I manually edited the URL to change https to http and login worked.

jpiesing avatar May 05 '22 06:05 jpiesing

We switched Github to https now.

yohanboniface avatar Jun 23 '23 13:06 yohanboniface

Thanks!

Sadly I cannot login for some weeks now, regardless of using http or https :cry: I can reproduce it every time using a standard Chromium 114 (Arch Linux) in private browsing mode and multiple Firefox instances with and without add-ons:

https://github.com/umap-project/umap/assets/74880272/1224ac9c-bcb2-4b23-87f6-2b36932be046

Using http instead of https results in the common 404 error, which should be fine due to the latest changes. I would like to backup all my maps and re-import them using another auth method, but I will have to login at least once for this...:smile: Revoking and granting access to my Github account didn't change anything, same error.

FFMbyBicycle avatar Jun 27 '23 07:06 FFMbyBicycle

That's another error, I guess due to username conflict (see for example #1106 ). What's your github username ?

yohanboniface avatar Jun 27 '23 08:06 yohanboniface

Ah, okay. My Github user is FFMbyBicycle, thanks for checking!

FFMbyBicycle avatar Jun 27 '23 09:06 FFMbyBicycle

That username was used with your Twitter login. I've renamed it, so you can use Github now.

yohanboniface avatar Jun 27 '23 09:06 yohanboniface

Whoops, thanks a lot! That Twitter hustle did cause some confusion, sorry for that.

FFMbyBicycle avatar Jun 27 '23 10:06 FFMbyBicycle