cadia-lvl / samromur

https://samromur.is/
MIT License
2 stars 2 forks source link

Recover password functionality #20

Closed staffanru closed 3 years ago

staffanru commented 3 years ago

Includes the recover password functionality. Basic flow

  1. Ask for reset link
  2. Click link in email
  3. Select new password
  4. Login

Behind the scenes

  1. a) check in db for user email, add password reset token and expire date. b) send email to user
  2. a) token is present as a url parameter
  3. a) both token and new password is sent via api to server b) if the token still hasn't expired update the password in db, send ok back