You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We allow administrators to reset a user's password via the CLI by connecting directly to the database (#1380). Otherwise, users may change their password in their account settings.
As a user, when I forget my password, I would like to reset it autonomously. This flow is facilitated in most products through a reset password link delivered to the user's email. We can implement the same flow using the new system-generated notifications.
When SMTP notifications are configured for a deployment, a new option would appear on the login page:
They'd then receive an email containing a link to create a new password.
Note
This would introduce a security vulnerability for teams, so admins should be able to disable the feature for their deployment or organization (once merged).
User is presented with a screen that asks for their email
User enters the email of their account
A one-time-passcode is sent to their email (with a short expiry)
User is presented with a field for the one-time-passcode
Show message in the UI such as "A one-time-passcode has been sent to your email if the provided email is valid"
We shouldn't have a different message if the email is valid or not to prevent enumeration attacks
User enters one-time-passcode
All existing sessions are logged out
User is logged into account
User is presented with a mandatory reset password screen
The decision to send a one-time-passcode to the users email over sending a password reset link is that many places advise against clicking links in emails as it makes people more susceptible to phishing attacks. This flow doesn't pose the same risk as the user never has to click a link from their email.
The decision to send a one-time-passcode to the users email over sending a password reset link is that many places advise against clicking links in emails as it makes people more susceptible to phishing attacks.
But your rationale is very thoughtful. Let's do it.
To help with the UI, I created mockups based on the existing design and the described user flow. Note: the mockups are not pixel-perfect as they are partially based on screenshots
See Figma
Activity
DanielleMaywood commentedon Sep 23, 2024
Proposal for how this would look:
The decision to send a one-time-passcode to the users email over sending a password reset link is that many places advise against clicking links in emails as it makes people more susceptible to phishing attacks. This flow doesn't pose the same risk as the user never has to click a link from their email.
@stirby thoughts on this approach?
stirby commentedon Sep 24, 2024
This is exactly as I imagined, except:
But your rationale is very thoughtful. Let's do it.
DanielleMaywood commentedon Sep 27, 2024
After a discussion with @johnstcn and @mafredri we have come up with a slightly simplified flow.
Rather than these final 3 steps as originally presented:
We'd instead do this:
This removes an extra step from the flow.
How does this sound to you @stirby?
stirby commentedon Sep 27, 2024
Yes, all for simplification @DanielleMaywood.
One more question: do we hide the button when
DanielleMaywood commentedon Sep 27, 2024
For both it will be hidden.
feat: implement api for "forgot password?" flow (#14915)
mtojek commentedon Oct 4, 2024
@BrunoQuaresma Heads-up, this issue will require frontend work 👍 @DanielleMaywood will share details.
chrifro commentedon Oct 15, 2024
To help with the UI, I created mockups based on the existing design and the described user flow. Note: the mockups are not pixel-perfect as they are partially based on screenshots
See Figma
Over to you @BrunoQuaresma 🏀
johnstcn commentedon Oct 17, 2024
Thought: we should probably add a more aggressive rate-limit to the "request password reset" endpoint. I think once per minute should be more than sufficient.
Example: https://github.com/coder/coder/blob/main/coderd/coderd.go#L986-L991
BrunoQuaresma commentedon Oct 18, 2024
Closed by #15108