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] Change email function #271

Open
17 tasks
dyzhuu opened this issue Sep 9, 2024 · 0 comments
Open
17 tasks

[Feature] Change email function #271

dyzhuu opened this issue Sep 9, 2024 · 0 comments

Comments

@dyzhuu
Copy link
Contributor

dyzhuu commented Sep 9, 2024

User story:

This involves the frontend(s) and API creation

Description:

Acceptance Criteria:

  • If OAuth & no password
    • Popup saying you need to create password
    • Message that linked OAuth accounts will be unlinked
    • Send email to user with reset password link (to create password)
  • If has password
    • Confirm password
    • Change email with verification code (like in login screen)
  • Redirect back to account page
  • POST request at users/[id]/change-email
    • Takes the following payload
    password:
    newEmail:
    
    • Password must be verified against current hashed password with bcrypt
    • Email should not already exist
    • If successful
      • Create token (similar to api/auth/register/validate-email)
      • Send verification email to new email
  • POST request at users/[id]/change-email/verify-token
    • Has the following payload:
    newEmail:
    token:
    
    • Verifies token
    • Verifies email does not already exist
    • Change email if successful

Definition of Done:

  • AC met
  • Applicable tests written
  • Applicable documentation is written in GH wiki
  • PR reviewed
  • Merged into main/feature branch

Notes / Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants