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

[Feature] Password Reset Token Flow (Confirmation Codes) #142

Open
6 tasks
xHayden opened this issue Sep 3, 2024 · 0 comments · May be fixed by #153, #155 or #154
Open
6 tasks

[Feature] Password Reset Token Flow (Confirmation Codes) #142

xHayden opened this issue Sep 3, 2024 · 0 comments · May be fixed by #153, #155 or #154
Assignees
Labels

Comments

@xHayden
Copy link
Contributor

xHayden commented Sep 3, 2024

Context

The existing app provides authentication, but email validation is currently unsupported. This ticket focuses on implementing the backend functionality for generating, storing, and validating confirmation codes necessary for email validation and password reset processes.

Requirements

Backend

  • Generate Confirmation Code: Create a function to generate a unique confirmation code.
  • Store Confirmation Code: Store the generated confirmation code in the database associated with the user's email address.
  • Send Confirmation Code: Implement an action that sends the generated confirmation code to the user's email using MailerSend.
  • Validate Confirmation Code: Create a function to validate the confirmation code provided by the user against the stored code in the database.
  • Expire Confirmation Code: Implement a mechanism to expire the confirmation code after a certain period (e.g., 15 minutes) or after a successful password reset. If the automatic is not simple, we'll move it to a new ticket just lmk.

Acceptance Criteria

  • A unique confirmation code is generated using the existing code generation structure.
  • The confirmation code is stored in the database associated with the user's email address.
  • The confirmation code is sent to the user's email using MailerSend.
  • The system validates the confirmation code provided by the user against the stored code in the database.
  • The confirmation code expires after a specified period or after successful password reset.
  • A clear error message is returned if the confirmation code is invalid or expired.

Notes

  • Ensure that the confirmation code handling is secure and that codes are generated and validated in a way that prevents brute force attacks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment