Page MenuHomePhabricator

Login with password change fails to log user in
Open, Needs TriagePublic

Description

On WMF sites, when a user is prompted to change their password during login (soft password reset), and then changes their password, their session seems to fail and they are no longer logged in. Logging in with the new password works as expected.

Event Timeline

Untested guess:

  1. User logs in, session gets set up (here).
  2. User gets sent to the change password form (from here).
  3. Password change resets the token (here), but the session doesn't get updated.
  4. ∴ Session is no longer valid due to mismatched token.

If that's the case, AuthManager should fix this because it changes the order of events:

  1. User starts logging in.
  2. User changes password during the login process. Token gets reset.
  3. Login completes and session gets set up.
  4. ∴ Session is valid because the token didn't get changed after it was set up.

The success page of the password change is shown as you are logged in, but when than clicking to another page, you are not logged in (even the details to echo notifications on the success page says, that your are not logged in, because that is using api requests for the detail information).