Page MenuHomePhabricator

Failed top-level autologin on mobile redirects to desktop
Closed, ResolvedPublic

Description

Failed top-level autologin on mobile redirects to desktop.

In a private browser window, visit the mobile site login page: https://en.m.wikipedia.org/wiki/Special:UserLogin – you will be redirected to https://en.wikipedia.org/wiki/Special:UserLogin?centralAuthAutologinTried=1&centralAuthError=Not+centrally+logged+in, which is the desktop site.

I ran into this by chance today while testing a CentralAuth/MobileFrontend config change.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

That's weird, we stash the exact starting URL to the token store and use that for returning, there shouldn't be any domain negotiation involved.

Except apparently WebRequest::getFullRequestUrl() returns the desktop domain regardless of what is in the actual request. Ugh.

Change 968329 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/CentralAuth@master] Top-level autologin: Use mobile URL when appropriate

https://gerrit.wikimedia.org/r/968329

Change 968329 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] Top-level autologin: Use mobile URL when appropriate

https://gerrit.wikimedia.org/r/968329