Skip to content

[BE-36] Implement forgot password and reset password endpoints #601

@yusuftomilola

Description

@yusuftomilola

Overview

Implement password reset flow with email-based token delivery inside backend/contrib/.

Location

All work must be inside backend/contrib/src/auth/ and backend/contrib/src/mail/.

Acceptance Criteria

  • POST /auth/forgot-password — accepts { email }, generates a short-lived token (15 min), stores hashed token in DB, sends email with reset link via nodemailer
  • POST /auth/reset-password — accepts { token, newPassword }, validates token, updates password, invalidates token
  • PasswordResetToken entity: id, userId, tokenHash, expiresAt, usedAt
  • MailModule and MailService created using nodemailer
  • Environment variables used: MAIL_HOST, MAIL_PORT, MAIL_USER, MAIL_PASS, MAIL_FROM

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions