Skip to content

BE16: Secure Password Verification & Update API#199

Merged
Vedant1515 merged 4 commits intomasterfrom
be16-secure-password-verification-update-api
Apr 2, 2026
Merged

BE16: Secure Password Verification & Update API#199
Vedant1515 merged 4 commits intomasterfrom
be16-secure-password-verification-update-api

Conversation

@TienNguyen3711
Copy link
Copy Markdown
Collaborator

@TienNguyen3711 TienNguyen3711 commented Mar 28, 2026

This PR extends the BE16 authentication work by fixing the forgot-password flow end to end and improving compatibility with the current frontend.

It adds backend support for:

  • requesting a password reset
  • sending a verification OTP to the user’s email
  • verifying the OTP code
  • setting a new password after successful verification

It also includes backward-compatible routes so the existing frontend can use the forgot-password flow without further changes. In addition, the update keeps the secure password verification flow aligned with the BE16 work, including validation and compatibility handling for the current UI.

Changes

  • add POST /api/password/request-reset to start the forgot-password flow
  • add POST /api/password/verify-code to validate the email OTP
  • add POST /api/password/reset to save the new password
  • send password reset OTP by email
  • validate reset code expiry and invalid attempt handling
  • validate new password strength before applying reset
  • add compatibility support so current frontend auth/password screens work with the backend branch

Testing

  • verified in browser with the current frontend flow:
    • request reset code
Screenshot 2026-03-31 at 6 49 44 pm
  • receive OTP by email
Screenshot 2026-03-31 at 6 54 49 pm
  • verify OTP
Screenshot 2026-03-31 at 6 54 37 pm
  • set a new password successfully
Screenshot 2026-03-31 at 6 55 44 pm

@Faithy847
Copy link
Copy Markdown
Collaborator

This has been reviewed.

Copy link
Copy Markdown
Collaborator

@Faithy847 Faithy847 left a comment

Choose a reason for hiding this comment

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

This has been reviewed

@TienNguyen3711 TienNguyen3711 force-pushed the be16-secure-password-verification-update-api branch from 07ba6c3 to da7a42c Compare March 29, 2026 00:32
@Vedant1515
Copy link
Copy Markdown
Collaborator

Resolve the merge conflict.

@Vedant1515 Vedant1515 merged commit 3022da3 into master Apr 2, 2026
9 checks passed
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.

3 participants