-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add forgot password page #155
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
Conversation
|
Important thing for security. You must not inform when the Email is invalid to the person who enters the email in forgot password as it can be used to find out which emails are registered on the website. Also remember extra rate limiting if it is not already done |
|
If someone enters an email that doesn't have a user attached to it, no forgot password request will be made. The user gets sent to the page to write in a OTP code, but no code will ever be valid. See here - the code you get doesn't exist in the db. Therefore this will always fail with the "incorrect code" error, no matter what you type in. Rate limiting is not implemented. In the auth router, I see you use the |
|
I can explain it when I come visit Trondheim or on a call after work? |
|
Yeah, I'll send you a message in the evening :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have the correct env variables for email or matrix, so I'll just assume they work. If emails aren't sent or the matrix password isn't updated, this should also be fixed.
|
I have sent you some more info on Matrix if you'd like to test this PR more in regards to email sending and such |
|
I have also tested the emails now, and they do work. |
Users can now reset their password, assuming they provide the correct email and OTP code that is sent to that email.