Page MenuHomePhabricator

Investigate why tools do not stay logged in for the duration of the session cookie
Open, HighPublic

Description

Reported at T224358 for Tool-global-search, but we see the same issue with XTools and our other projects that use the mediawiki/oauthclient library. I'm not certain if mediawiki/oauthclient actually has anything to do with it, but that seems to be the commonality among these tools.

The cookie is set to expire an entire year after login, but it seems users get logged out within as little as half an hour.

Event Timeline

I can confirm that when using it throughout the day to find and keep track of my progress fixing deprecated JS stuff on-wiki, that it feels like I can never get it to stay logged in for more than 30 minutes or an hour at a time.

Almost every time I revisit one of the tabs to renew or tune the search query, I have to go through the OAuth cycle again.

@Krinkle @Billinghurst I think I may have fixed this for Global Search. I've been logged in now for 15+ hours, which is a new record for me. Can either of you confirm you're also seeing longer login sessions?

The same fix did not appear to work for XTools. Investigation is ongoing.

@MusikAnimal <dancing> logged in for a couple of days now

MusikAnimal removed subscribers: Billinghurst, Krinkle.

Great! I am going to untag Tool-global-search and remove you two as subscribers, assuming you probably don't want to bothered about noise with us debugging XTools.

@Samwilson FYI this is what I did, which will probably work for any other Toolforge-based Symfony app: https://github.com/MusikAnimal/global-search/commit/12086c28a70e92ec86bf5ab6416466ffbf7a6964. The issue I believe is Symfony by default falls back to php.ini, which on Toolforge has sessions live for a mere 24 minutes. The same trick didn't work for XTools.