Page MenuHomePhabricator

Add confirmation step to exit session flow for temp accounts
Open, Needs TriagePublic

Description

Background

The exit/log out flow for a temporary user should include a confirmation step. When the temporary user clicks 'Exit session' a dialog should appear, prompting the user to confirm if they wish to exit and log out, and making it clear that there will be no way to log back into their temporary account.

User story

As a temporary user, I want to understand what will happen if I choose to exit a session, so that I can make an informed choice before logging out.

Requirements
  • Dialog launches when temp user clicks 'Exit session' in user profile menu
  • Copy explains what will happen if temp user exits session
  • Temp user can Cancel dialog or continue to Log out
Design

Figma file

Exit flow.png (1×4 px, 506 KB)

Copy
Dialog titleDialog body textDialog buttons
Exit sessionAre you sure you want to exit this session and log out? There is no way to log back into this temporary account.Cancel, Log out

Event Timeline

It can instead be linked to Special:UserLogout which will display a confirm page. Note clicking the logout link in personal toolbar send a POST request which will log out user directly (cf T25227/geerit 504565 which introduced this confirm page and gerrit 506386 which turns logout link to POST request).
T357484: Implement Logout Confirmation will add a preference to allow user to go to confirm page instead of log out directly when clicking logout link. We can reuse it, just require all temp users to use confirm page. Currently we already have a custom confirm message in Special:UserLogout for temp account so we don't need to make a new one.

It can instead be linked to Special:UserLogout which will display a confirm page. Note clicking the logout link in personal toolbar send a POST request which will log out user directly (cf T25227/geerit 504565 which introduced this confirm page and gerrit 506386 which turns logout link to POST request).
T357484: Implement Logout Confirmation will add a preference to allow user to go to confirm page instead of log out directly when clicking logout link. We can reuse it, just require all temp users to use confirm page. Currently we already have a custom confirm message in Special:UserLogout for temp account so we don't need to make a new one.

We are already linking to Special:UserLogout. We just need to disable the code that uses JS to log the user out, AFAICT. As @Bugreporter notes, we made some changes to the confirm message in T374519: When a temporary user clicks on "Exit session" the resulting success page says they "are now logged out". I think what we need to do is allow the user to continue to Special:UserLogout if they have a temporary account, rather than invoking the JS based logout method.