Last modified: 2014-07-21 00:30:09 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T51890, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49890 - Logging out on a different device logs me out everywhere else
Logging out on a different device logs me out everywhere else
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
CentralAuth (Other open bugs)
unspecified
All All
: High major with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: mobile
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-20 17:17 UTC by Jon
Modified: 2014-07-21 00:30 UTC (History)
21 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jon 2013-06-20 17:17:55 UTC
It is very common to find yourself continuously logging in on mobile/desktop when you use both. According to Brion Vibber this is because you cannot login and remain logged in on more than one device.

Not sure how to fix but it would nice to stay logged in on both desktop and mobile for a month.
Comment 1 Brion Vibber 2013-06-20 17:42:37 UTC
This can be tough to reproduce because session cookies might be sitting around, as might global cookies and.... it gets scary. ;)

But fundamental problem is that there's only a single user_token value, which holds the magic saved cookie that verifies you and restarts your session after the session cookies are gone.

To stay logged in reliably on multiple devices, we need to be able to store multiple remembered-login tokens.
Comment 2 Chris Steipp 2013-06-20 18:03:47 UTC
You should get the same token in both sessions, but I'll check that scenario. I wouldn't be surprised if we try to regenerate at some point when you have the remember me checked.

I need to rework some of the token handling in general, so I'll probably look into this after OAuth is out. If this is a serious issue, please adjust the priority and we'll shift things around.
Comment 3 Jon 2013-06-20 18:11:21 UTC
I'd say this is pretty high priority for the mobile team. Logging in on mobile is a pain and a lot of our workflows are optimised to be as simple as possible once logged in and all editing on mobile requires authentication in the current state. Any help here would be greatly appreciated.
Comment 4 Jon 2013-07-11 21:07:21 UTC
OK I can replicate this now:

Login on mobile
Login on desktop
Logout on desktop
Now you are also logged out on mobile

Vice versa
Login on mobile
Login on desktop
Logout on mobile
You are now logged out on desktop.
Comment 5 Chris Steipp 2013-07-11 21:18:11 UTC
Yes. Logging *out* refreshes a token, so other logged in sessions will be invalidated. This was done by Tim in 2008, and as I understand it, it's by design.

I personally like that it works this way, in case a user forgets they logged in somewhere and left the browser open. however we could do something like facebook, and provide a button in the user's preferences to log out any other sessions.
Comment 6 Jon 2013-07-12 17:16:10 UTC
Tim, is this something we want to reconsider?

Personally I spend a lot of time over many devices. A lot of the time I might log into my account temporarily on a friends machine and logout. Being logged out on mobile and having to log in again is a pain and breaks my mobile workflow and I'm sure the workflows of others.

Jared - this doesn't seem to be a good user experience. The situation where a user forgets they logged in somewhere doesn't quite hold much weight for me - in this age we have incognito windows, we have a box that says 'keep me logged in' on the login form (I'd assume this would logout that session on closing my browser window) and all sorts of other ways to protect us from this. It seems we could still support this but as more of a power user feature - either as part of the logout process or a user preference.

Thoughts?
Comment 7 Brion Vibber 2013-07-12 17:20:21 UTC
I strongly concur with Jon on this one; users (or at least I!) expect to be able to remain logged in on multiple devices, and our current user experience is Broken with a big ol' B.

As far as I know, CentralAuth just inherited the same single-token design from MediaWiki's local auth; I don't think it was a deliberate design decision.
Comment 8 Jared Zimmerman (WMF) 2013-07-12 18:01:13 UTC
I do think this opens a can of worm for needing an interface for remote logging out of other devices which i really don't want to tackle right now. I've seen both patterns work well (A. log out one place logs you out globally, vs. B.log out on one device only logs you out on that device) One feels more secure (A) where as (B) feels more casual but convenient. From a UX perspective I don't actually have a point of view on this as long as we're being consistent.

If we want to wait until we have a UI for logging out of all or logging out of specific devices available to users I'd be fine with a log out once logs you out everywhere behavior until we can get the multiple login behavior to where we want it.
Comment 9 Quim Gil 2013-07-15 16:16:58 UTC
I thought I was the only one having this annoying problem...

I don't keep a mobile login session for more than one day, even if I don't touch my laptop at all (I realized this weekend, when I had only my mobile device, no laptop).
Comment 10 Chris Steipp 2013-07-15 16:39:04 UTC
Hi Quim, if you didn't use another browser where you actually clicked logout, then you're hitting another issue.

Has anyone on the mobile team verified how long a cookie, set for the session duration, actually lasts on a mobile device? I know both bugzilla and gerrit seem to also timeout pretty quickly on my phone, whereas they last almost forever on desktop.
Comment 11 Jon 2013-07-15 17:49:14 UTC
Opened bug 51377 for the other issue. Let's discuss it there.
Comment 12 John Mark Vandenberg 2013-07-29 02:26:52 UTC
I am regularly being logged out when using two different browsers (Firefox and Chrome) on the same workstation.  I log out of one browser, and I am automatically logged out of the other one.  Is this bug the cause? (should the summary be 'log out is always global')  MediaWiki:Logouttext should mention that the logout is now global.  Is it a regression or planned feature?
Comment 13 Andre Klapper 2013-12-09 16:07:34 UTC
(In reply to comment #12)
> I am regularly being logged out when using two different browsers (Firefox
> and
> Chrome) on the same workstation.  I log out of one browser, and I am
> automatically logged out of the other one.  Is this bug the cause? (should
> the
> summary be 'log out is always global')  MediaWiki:Logouttext should mention
> that the logout is now global.  Is it a regression or planned feature?

jayvdb: Is the situation still as described?
Comment 14 Chris Steipp 2013-12-09 18:22:11 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > I am regularly being logged out when using two different browsers (Firefox
> > and
> > Chrome) on the same workstation.  I log out of one browser, and I am
> > automatically logged out of the other one.  Is this bug the cause? (should
> > the
> > summary be 'log out is always global')  MediaWiki:Logouttext should mention
> > that the logout is now global.  Is it a regression or planned feature?
> 
> jayvdb: Is the situation still as described?

Yes, logout is global
Comment 15 Antoine "hashar" Musso (WMF) 2014-07-01 20:26:40 UTC
The browsertests are most probably impacted. They are run concurrently in virtual instances and wiki that have shared auth.  Whenever a test ends up login out the user, the other tests running in different instances are being logged out.

I am highly suspecting this bug report to be the cause of our mysterious logout and started a thread on QA mailing list about it:

  [QA] browser tests race condition with login/logout
  http://lists.wikimedia.org/pipermail/qa/2014-July/001643.html


Some site let you login from different devices and list the valid sessions in your user preference. Ie session vary by browser or IP (can't remember details).  You can then manually invalidate a session.

I think Phabricator is using that system.
Comment 16 MZMcBride 2014-07-16 05:24:09 UTC
(In reply to Chris Steipp from comment #5)
> Yes. Logging *out* refreshes a token, so other logged in sessions will be
> invalidated. This was done by Tim in 2008, and as I understand it, it's by
> design.

Done by Tim in the CentralAuth extension? Cross-referencing a commit or SVN revision would be helpful for me.

The current behavior (log out anywhere logs out everywhere) has probably become the expected behavior. I've personally relied on the behavior to stop adminbots running under my account, as I recall.

I would like to think that most users typically stay logged in on their devices or use incognito mode on a public computer, but perhaps this is an overly optimistic view.

> I personally like that it works this way, in case a user forgets they logged
> in somewhere and left the browser open. however we could do something like
> facebook, and provide a button in the user's preferences to log out any
> other sessions.

[[mw:Extension:SecureSessions]], of course.
Comment 17 TeleComNasSprVen 2014-07-16 05:44:05 UTC
User experience versus security again...

Well, I suppose you could simply store it as yet another user preference, so people who prefer user experience have their way and people who prefer security (log out of all browser sessions) also have their way.
Comment 18 Tim Starling 2014-07-16 06:20:38 UTC
Before CentralAuth, logout was local, and password change was an effective global logout, invalidating all sessions and persistent cookies. I remember reimplementing this policy in r5523, I had no problem with it.

The change in policy for CentralAuth was apparently done by Andrew Garrett in r33061. The doc comment on resetAuthToken() indicates that it was a deliberate policy -- although the fact that it is a different policy from the core was not noted. I reviewed it at the time (as evidenced by r33063), but I don't think I considered the logout policy beyond accepting the emphatic rationale in the doc comment.

I am fine with the idea of making logout local again, but I think a nice additional feature would be to add a button to the logout success page which allows you to explicitly log out from all devices, without having to reset your password.
Comment 19 MZMcBride 2014-07-21 00:30:09 UTC
(In reply to Tim Starling from comment #18)
> I am fine with the idea of making logout local again, but I think a nice
> additional feature would be to add a button to the logout success page which
> allows you to explicitly log out from all devices, without having to reset
> your password.

Yes, a "log me out everywhere" button sounds like a good idea.

Assuming the logout behavior is changed here at all, a more minimal approach would be to only inform the user in a post-logout message if additional sessions remain open/active.

In my opinion, given that this is a proposed change in perhaps expected behavior (i.e., I imagine some users now expect "log out" to log them out everywhere), user notification in a post-logout message is a hard requirement, while adding an additional tool to actively kill sessions would be a soft requirement.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links