Skip to content

feat(auth): Story 2.4 - Password Reset Flow#3

Merged
BradleyFestraets merged 1 commit intomainfrom
feature/story-2.4-password-reset-flow
Nov 30, 2025
Merged

feat(auth): Story 2.4 - Password Reset Flow#3
BradleyFestraets merged 1 commit intomainfrom
feature/story-2.4-password-reset-flow

Conversation

@BradleyFestraets
Copy link
Owner

Summary

Implements complete password reset flow with email delivery for Story 2.4 of Epic 2.

Changes

Email Infrastructure

  • Created \PasswordResetEmail\ template using React Email
  • Added \sendPasswordResetEmail\ function to email service
  • Professional email design with reset link and expiry notice (1 hour)

Backend Updates

  • Updated \�uth.requestPasswordReset\ to send actual emails via Resend
  • Graceful error handling (still returns success to prevent email enumeration)
  • Logging for successful email sends

UI Enhancements

  • Forgot Password Page:

    • Upgraded with Card layout and shadcn/ui components
    • Added success state showing 'Check Your Email' confirmation
    • Improved user feedback with email confirmation display
  • Reset Password Page:

    • Upgraded with Card layout and shadcn/ui components
    • Added success state with auto-redirect to login
    • Password requirements displayed as hints
    • Improved validation feedback

Acceptance Criteria

  • 'Forgot Password?' link on login page (from Story 2.3)
  • Password reset request page collects email
  • Secure reset token generated (UUID, 1-hour expiry)
  • Reset email sent with link containing token
  • Reset link leads to new password form
  • Token validated before password change
  • Password updates and token invalidated

Testing

  • All 6 unit tests passing
  • TypeScript and ESLint checks passing
  • Prettier formatting verified

Files Changed

  • \src/lib/email/password-reset.tsx\ - New password reset email template
  • \src/lib/email/index.ts\ - Added sendPasswordResetEmail function
  • \src/server/api/routers/auth.ts\ - Integrated email sending
  • \src/app/forgot-password/page.tsx\ - Enhanced UI with Card components
  • \src/app/reset-password/[token]/page.tsx\ - Enhanced UI with Card components

Story: 2.4 - Password Reset Flow
Epic: 2 - Venue Management & User Onboarding

Implements complete password reset flow with email delivery:

Email Infrastructure:
- Created PasswordResetEmail template using React Email
- Added sendPasswordResetEmail function to email service
- Professional email design with reset link and expiry notice

Backend Updates:
- Updated auth.requestPasswordReset to send actual emails via Resend
- Graceful error handling (still returns success to prevent enumeration)
- Logging for successful email sends

UI Enhancements:
- Upgraded forgot-password page with Card layout and shadcn/ui components
- Added success state showing 'Check Your Email' confirmation
- Upgraded reset-password page with Card layout and validation hints
- Added success state with redirect to login after reset
- Password requirements displayed to users

Acceptance Criteria Met:
 'Forgot Password?' link on login page (from Story 2.3)
 Password reset request page collects email
 Secure reset token generated (UUID, 1-hour expiry)
 Reset email sent with link containing token
 Reset link leads to new password form
 Token validated before password change
 Password updates and token invalidated

Story-2.4
@vercel
Copy link
Contributor

vercel bot commented Nov 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
crowdiant-ai Ready Ready Preview Comment Nov 30, 2025 9:44am

@BradleyFestraets BradleyFestraets merged commit 45a5d04 into main Nov 30, 2025
3 checks passed
@BradleyFestraets BradleyFestraets deleted the feature/story-2.4-password-reset-flow branch November 30, 2025 09:44
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.

1 participant