Page MenuHomePhabricator

Bogus "Your central login session has expired." message when trying to switch accounts
Closed, ResolvedPublicBUG REPORT

Description

Visit the login page while already logged in, and you'll see

You are already logged in as Foo.

and then below it

Your central login session has expired. Please log in again to continue.

but the session is obviously fine, as the first message shows.

Event Timeline

Change #1215531 had a related patch set uploaded (by D3r1ck01; author: Derick Alangi):

[mediawiki/extensions/CentralAuth@master] Do not show central session expiry if it hasn't expired

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

Oops, I missed this during code review and local testing of 56126683a56. Fixed now:

beforeafter
Screenshot 2025-12-05 at 12.36.47 PM.png (1×3 px, 337 KB)
Screenshot 2025-12-05 at 12.37.31 PM.png (1×3 px, 318 KB)

I observed that during testing locally, when the user is logged in locally and logged out centrally, visiting Special:CreateAccount or Special:UserLogin from the local wiki redirects to Special:UserLogin regardless.

This makes sense because it detects that the user has a local session active, but must first log in centrally to perform any other actions. After the user logs in centrally, they are redirected to the page for the previous action they attempted (login or sign up) on the central domain with the correct messages at the top of the form.

Screenshot 2025-12-05 at 2.12.07 PM.png (1×3 px, 249 KB)

I think the flow above is correct.

Change #1215531 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] SUL3: Show expiry message only if user isn't logged-in centrally

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

matmarex subscribed.

Thanks for fixing this, my bad!