Skip to content

Conversation

@Shazzz135
Copy link
Collaborator

This pull request implements email verification as part of the signup flow, enhances backend and frontend logic to support this, and introduces protected dashboard routes that require both authentication and verified email. The changes include backend support for email verification templates, improved user data handling, and frontend updates for signup, verification, and dashboard access.

Backend changes for email verification:

  • Added a new email template system for signup verification, including subject, HTML, plain text, and preview files (signupVerification templates and related data mapping). [1] [2] [3] [4] [5]
  • Refactored EmailService.sendVerificationCode to use the new template manager for rendering email verification messages.

User data enhancements:

  • Included isEmailVerified in user objects returned by login, registration, and profile endpoints to allow the frontend to check email verification status. [1] [2] [3]

Frontend signup and verification flow:

  • Updated SignupForm to redirect users to a two-factor authentication (2FA) page for email verification after registration, storing relevant data in sessionStorage.
  • Enhanced TwoFactorAuth to handle both password reset and signup verification flows, including verifying email, updating tokens, fetching user data, and redirecting to the appropriate dashboard. [1] [2] [3] [4] [5] [6]
  • Added an EmailVerificationSuccess component to display a confirmation screen and redirect users to their dashboard after successful email verification.

Protected dashboard routes:

  • Introduced a ProtectedRoute component to restrict access to dashboard routes, requiring both authentication and verified email status. Updated dashboard routes in App.tsx to use this protection. [1] [2] [3] [4]

@Shazzz135 Shazzz135 requested a review from Flapjacck February 6, 2026 20:05
Copy link
Member

@Flapjacck Flapjacck left a comment

Choose a reason for hiding this comment

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

LGTM

@Flapjacck Flapjacck merged commit 7227354 into main Feb 7, 2026
2 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.

2 participants