Geosyntec / StormPiper

Mozilla Public License 2.0
0 stars 1 forks source link

request pwd reset token #65

Closed austinorr closed 1 year ago

austinorr commented 2 years ago

create "request reset token" button/ui

user requests reset token, system emails them a 1hr expiring token to reset their pwd. user navigates to page to enter new pwd.

@acang-gs let's flesh this out more too, the email could be a link to a route that has the token on it that the front end pops-off, or it can be a simple copy/paste exercise for user. currently it's the latter. let's discuss.

acang-gs commented 2 years ago

@austinorr including the token in a reset link sounds doable - is there a way for me to test email functionality locally or does this have to be done on the dev site? Also, is there a way to check whether the reset link has expired before submitting a password for reset? That way we can redirect the user to a page that lets them know that the link has expired.

acang-gs commented 2 years ago

As a user wanting to reset my password:

austinorr commented 2 years ago

@austinorr including the token in a reset link sounds doable - is there a way for me to test email functionality locally or does this have to be done on the dev site?

Yes, i can give you the keys for your .env-dev

The backend is building and sending the email with the link, but the front end will need to 'catch' the token as a query param and then use it so the user doesn't have to copy/paste it into a form. We can work together on this, i have a reference implementation in WIP that i used to test the embedded links.

Also, is there a way to check whether the reset link has expired before submitting a password for reset? That way we can redirect the user to a page that lets them know that the link has expired.

maybe... we could add an 'expires_at' qparam that the front end can check, but we should likely not write a more general token checker into the backend.

austinorr commented 2 years ago

@acang-gs user forgot password flow (revised):

reset flow: