Skip to content
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

[#93} User can reset password #106

Merged
merged 14 commits into from
Aug 27, 2024
Merged

[#93} User can reset password #106

merged 14 commits into from
Aug 27, 2024

Conversation

javtran
Copy link
Contributor

@javtran javtran commented Aug 23, 2024

#93

  • User can request password reset

    • New client page, route /password-forgot
    • New API to request password reset /api/v1/users/request-password-reset
      • Sets passwordResetToken and passwordResetExpires in db
      • Sends password reset link to user's email
  • User can reset password through password reset link

    • New client page, route /password-reset/:passwordResetToken
    • New API to validate password reset link /api/v1/users/verify-password-reset/:token
      • Checks if token is valid and is not expired
    • New API to complete password reset /api/v1/users/password-reset
      • Updates password and sends confirmation email to user
  • Grouped all authentication-related pages under auth folder.

  • Grouped reused form CSS classes under /pages/auth/form.classes.module

  • Added auth layout AuthLayout for authentication-related pages

@javtran javtran self-assigned this Aug 23, 2024
@javtran
Copy link
Contributor Author

javtran commented Aug 23, 2024

@francisli
Not sure if we need to consider these cases:

  • User uses an old password for password reset (we would have to keep track of a list of old password to prevent them from reusing?)
  • How often they can reset their password

Copy link
Contributor

@francisli francisli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! I tweaked some of the route paths a bit so they're less verbose and grouped... on the server side I moved them from users (which is getting a bit busy) into auth...

@francisli francisli merged commit f779da0 into dev Aug 27, 2024
1 check passed
@francisli francisli deleted the 93-password-reset branch August 27, 2024 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User can reset their password starting from the Forgot password link on the Log in page
2 participants