Skip to content
This repository was archived by the owner on Jun 15, 2026. It is now read-only.

feat: prevent user form login before conforming his email#56

Merged
RMCampos merged 3 commits into
mainfrom
feat/prevent-user-from-login-without-confirming-account
May 17, 2026
Merged

feat: prevent user form login before conforming his email#56
RMCampos merged 3 commits into
mainfrom
feat/prevent-user-from-login-without-confirming-account

Conversation

@RMCampos

Copy link
Copy Markdown
Owner

This pull request implements a complete "email not confirmed" flow for user login. It introduces backend validation to prevent unconfirmed users from logging in, provides a clear error message, and updates the frontend to display a resend confirmation email button when appropriate. Additionally, the changes enhance internationalization support for the new messages and improve test coverage for these scenarios.

Backend: Email Confirmation Enforcement

  • Added a new EmailNotConfirmedException and updated AuthService to throw this exception if a user attempts to log in without confirming their email. This ensures only confirmed users can authenticate. [1] [2] [3]
  • Updated backend tests in AuthServiceTest to cover both the confirmed and unconfirmed email login scenarios, ensuring the new logic is robust and well-tested. [1] [2] [3] [4] [5]

Frontend: Login Form and Resend Flow

  • Enhanced the LoginForm component to detect the "Email not confirmed!" error, display a user-friendly message, and show a "Resend Confirmation Email" button. The resend button is also shown after a successful resend action. [1] [2] [3] [4] [5] [6] [7]
  • Added a new test in LoginForm.test.tsx to verify that the resend button appears when login fails due to an unconfirmed email.

Internationalization and Server Response Mapping

  • Updated serverResponses and serverResponsesTranslations to include keys and translations for "Email not confirmed!" and "Confirmation email re-sent! Please check the spam folder." in multiple languages, ensuring a consistent user experience. [1] [2] [3] [4]

Other Minor Fixes

  • Adjusted a test in SidebarProvider.test.tsx to expect the correct page route after navigation.

@RMCampos RMCampos merged commit 84f6a00 into main May 17, 2026
5 of 6 checks passed
@RMCampos RMCampos deleted the feat/prevent-user-from-login-without-confirming-account branch May 17, 2026 20:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant