New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement a password recovery machanism #652
Comments
An elaboration of the reset password mechanism. An actual question would be the Note in the Flow 1 section, where the stateless nature of the timed tokens generated in themselves cannot prevent an anonymous actor on the Internet who knows a user's Overall we need three views and two user flows outlined in detail below. User FlowsFlow 1: request a password reset for a given email
Note:
Flow 2: reset the password for a given email
ViewsView 1- request password reset viewA form consisting of:
Note:
View 2- password reset viewA form consisting of:
View 3- reset password link invalid viewA page of text consisting of:
|
I think that the concern you raised in the OP regarding spam email is pretty serious. Do you have any ideas on how to mitigate this vulnaribility? |
State must be introduced to deal with this issue fundamentally. One possibility is to have a table with the columns: email, hashed unique url token, timestamp. When the reset password flow for a valid email is triggered an entry can be made, then the number of entries for the given email can be counted for the past x minutes, if the count is above a certain threshold n, then the email sending service would not be triggered. On the reset password flow where a user opens a link from the email, then the decision of whether a valid or invalid view is returned can be based on the entry timestamp as well, i.e. how old the newest entry is for the given email (or it can be still based on a timed token). Such a table would have to be cleaned periodically by some job, deleting all entries older then a certain amount of time. |
The user should be able to request an email that contains a password reset link. Clicking that link should direct the user to a webpage where they can enter a new password. The link to reset the password should be valid for 15 minutes.
The text was updated successfully, but these errors were encountered: