1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 11:30:55 +01:00
phorge-phorge/src/applications/auth
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
..
action Rate limit multi-factor actions 2014-04-30 14:30:31 -07:00
application Separate "Set/Reset Password" from "Change Password" 2017-12-26 08:34:14 -08:00
capability Auth - add "manage providers" capability 2015-01-12 14:37:58 -08:00
conduit Deactivate SSH keys instead of destroying them completely 2016-05-18 14:54:28 -07:00
constants Support invites in the registration and login flow 2015-02-11 06:06:28 -08:00
controller Separate "Set/Reset Password" from "Change Password" 2017-12-26 08:34:14 -08:00
data Add session and request hooks to PhabricatorAuthSessionEngine 2016-11-17 13:09:29 -08:00
editor Fix spelling 2017-10-09 10:48:04 -07:00
engine Rename "PhabricatorHash::digest()" to "weakDigest()" 2017-04-06 15:43:33 -07:00
exception Add email invites to Phabricator (logic only) 2015-02-09 16:12:36 -08:00
extension Restore the "Log In" menubar action 2017-12-05 12:13:10 -08:00
factor Fix spelling 2017-10-09 10:48:04 -07:00
garbagecollector Provide bin/garbage for interacting with garbage collection 2015-10-02 09:17:24 -07:00
guidance Add a bunch of Phacility-specific code to the upstream, thinly veiled as generic code 2016-11-15 09:11:22 -08:00
handler Modularize generation of supplemental login messages 2015-09-04 10:34:39 -07:00
mail Send forced mail on SSH key edits 2016-05-19 15:01:25 -07:00
management Fix spelling 2017-10-09 10:48:04 -07:00
phid Fix an issue with AuthProviderConfig handles 2016-06-16 06:04:43 -07:00
provider Add spelling TODOs 2017-10-09 11:56:53 -07:00
query Dirty the SSH key cache when usernames change 2017-04-14 08:03:00 -07:00
revoker Provide "bin/auth revoke" with a revoker for Conduit tokens 2017-03-03 14:38:55 -08:00
sshkey Send forced mail on SSH key edits 2016-05-19 15:01:25 -07:00
storage Support HMAC+SHA256 with automatic key generation and management 2017-04-06 15:42:59 -07:00
tokentype Redesign Config Application 2016-08-29 15:49:49 -07:00
view Add ViewController and SearchEngine for SSH Public Keys 2016-05-19 09:48:46 -07:00
worker Send emails for email invites 2015-02-11 06:06:09 -08:00