1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-08 12:58:31 +01:00
phorge-phorge/src/applications/auth/controller
epriestley ad4db9b2f3 Separate "Set/Reset Password" from "Change Password"
Summary:
See PHI223. Ref T13024. There's a remaining registration/login order issue after the other changes in T13024: we lose track of the current URI when we go through the MFA flow, so we can lose "Set Password" at the end of the flow.

Specifically, the flow goes like this today:

  - User clicks the welcome link in email.
  - They get redirected to the "set password" settings panel.
  - This gets pre-empted by Legalpad (although we'll potentially survive this with the URI intact).
  - This also gets pre-empted by the "Set MFA" workflow. If the user completes this flow, they get redirected to a `/auth/multifactor/?id=123` sort of URI to highlight the factor they added. This causes us to lose the `/settings/panel/password/blah/blah?key=xyz` URI.

The ordering on this is also not ideal; it's preferable to start with a password, then do the other steps, so the user can return to the flow more easily if they are interrupted.

Resolve this by separating the "change your password" and "set/reset your password" flows onto two different pages. This copy/pastes a bit of code, but both flows end up simpler so it feels reasonable to me overall.

We don't require a full session for "set/reset password" (so you can do it if you don't have MFA/legalpad yet) and do it first.

This works better and is broadly simpler for users.

Test Plan:
  - Required MFA + legalpad, invited a user via email, registered.
    - Before: password set flow got lost when setting MFA.
    - After: prompted to set password, then sign documents, then set up MFA.
  - Reset password (with MFA confgiured, was required to MFA first).
  - Tried to reset password without a valid reset key, wasn't successful.
  - Changed password using existing flow.
  - Hit various (all?) error cases (short password, common password, mismatch, missing password, etc).

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13024

Differential Revision: https://secure.phabricator.com/D18840
2017-12-26 08:34:14 -08:00
..
config Make "simple" a "button type", not a "color" 2017-05-30 17:59:37 -07:00
PhabricatorAuthConfirmLinkController.php Update Auth for new UI 2016-03-31 13:51:12 -07:00
PhabricatorAuthController.php Fix spelling 2017-10-09 10:48:04 -07:00
PhabricatorAuthDowngradeSessionController.php Update Auth for handleRequest 2015-08-01 16:49:27 -07:00
PhabricatorAuthFinishController.php Use Log In vs. Login when it's a verb 2017-08-02 12:26:47 -07:00
PhabricatorAuthInviteController.php Support invites in the registration and login flow 2015-02-11 06:06:28 -08:00
PhabricatorAuthLinkController.php Update Auth for new UI 2016-03-31 13:51:12 -07:00
PhabricatorAuthLoginController.php Use Log In vs. Login when it's a verb 2017-08-02 12:26:47 -07:00
PhabricatorAuthNeedsApprovalController.php Update Auth for new UI 2016-03-31 13:51:12 -07:00
PhabricatorAuthNeedsMultiFactorController.php Allow MFA enrollment before email verification 2017-11-28 10:01:09 -08:00
PhabricatorAuthOldOAuthRedirectController.php Update Auth for handleRequest 2015-08-01 16:49:27 -07:00
PhabricatorAuthOneTimeLoginController.php Separate "Set/Reset Password" from "Change Password" 2017-12-26 08:34:14 -08:00
PhabricatorAuthRegisterController.php Fix spelling 2017-10-09 10:48:04 -07:00
PhabricatorAuthRevokeTokenController.php Clean up redirect URIs for "Temporary Tokens" and "API Tokens" settings panels 2016-06-28 14:51:04 -07:00
PhabricatorAuthSetPasswordController.php Separate "Set/Reset Password" from "Change Password" 2017-12-26 08:34:14 -08:00
PhabricatorAuthSSHKeyController.php Add ViewController and SearchEngine for SSH Public Keys 2016-05-19 09:48:46 -07:00
PhabricatorAuthSSHKeyDeactivateController.php Use transactions to apply web UI SSH key edits 2016-05-19 15:00:18 -07:00
PhabricatorAuthSSHKeyEditController.php Redirect users back to where they added an SSH Key 2017-08-21 14:02:27 -07:00
PhabricatorAuthSSHKeyGenerateController.php Remove PhabricatorFile::buildFromFileDataOrHash() 2017-04-04 16:18:00 -07:00
PhabricatorAuthSSHKeyListController.php Add ViewController and SearchEngine for SSH Public Keys 2016-05-19 09:48:46 -07:00
PhabricatorAuthSSHKeyViewController.php Use transactions to apply web UI SSH key edits 2016-05-19 15:00:18 -07:00
PhabricatorAuthStartController.php Use Log In vs. Login when it's a verb 2017-08-02 12:26:47 -07:00
PhabricatorAuthTerminateSessionController.php Rename "PhabricatorHash::digest()" to "weakDigest()" 2017-04-06 15:43:33 -07:00
PhabricatorAuthUnlinkController.php Use Log In vs. Login when it's a verb 2017-08-02 12:26:47 -07:00
PhabricatorAuthValidateController.php Update Auth for handleRequest 2015-08-01 16:49:27 -07:00
PhabricatorDisabledUserController.php Update Auth for new UI 2016-03-31 13:51:12 -07:00
PhabricatorEmailLoginController.php More completely explain why we're refusing to send reset mail to an unverified address 2017-09-20 10:46:22 -07:00
PhabricatorEmailVerificationController.php Update Auth for new UI 2016-03-31 13:51:12 -07:00
PhabricatorLogoutController.php Use Log In vs. Login when it's a verb 2017-08-02 12:26:47 -07:00
PhabricatorMustVerifyEmailController.php Use Log In vs. Login when it's a verb 2017-08-02 12:26:47 -07:00
PhabricatorRefreshCSRFController.php Update Auth for handleRequest 2015-08-01 16:49:27 -07:00