Skip to content

[auth] account registration form and email activation#493

Open
amahuli03 wants to merge 9 commits intoCodeForPhilly:developfrom
amahuli03:auth-registration-email-activation
Open

[auth] account registration form and email activation#493
amahuli03 wants to merge 9 commits intoCodeForPhilly:developfrom
amahuli03:auth-registration-email-activation

Conversation

@amahuli03
Copy link
Copy Markdown
Collaborator

Related Issue

Closes #485
Related to #483
Blocked by #484, which needs to be reviewed and merged before this

Description

Builds the full registration-to-activation flow so users can create accounts and verify their email before logging in. The backend infrastructure (Djoser endpoints, email config) was already in place. This PR completes the frontend and connects the pieces together.

Changes:

  • Dev email backend prints to Docker logs instead of sending real emails, so the registration flow can be tested locally without email credentials. In production (DEBUG=False) the existing Gmail SMTP config is used.
  • The signup and email activation Redux actions are wired up. There was commented-out code in auth.tsx that was used as a starting point and updated to use the current endpoint patterns and error handling.
  • Registration form is fully built with first name, last name, email, password, and confirm password fields. Client-side validation via Yup handles missing fields, invalid email, weak password, and password mismatch. Server-side errors from Djoser (e.g. duplicate email) are displayed on the form. On success, shows a "check your email" screen with a resend link.
  • Email activation page added at /activate/:uid/:token. Calls Djoser's activation endpoint on mount, shows a success state with "Continue to log in" or an error state for invalid/expired/already-used links.
  • DOMAIN and SITE_NAME added to settings so Djoser generates activation links pointing to the frontend (localhost:3000 in dev) rather than the internal Docker backend hostname.

Manual Tests

Testing:

  • Tested in local dev environment
  • Valid registration creates inactive account, activation email appears in Docker logs
  • Activation link activates account, user can log in
  • Duplicate email, weak password, mismatched passwords all show appropriate errors
  • Expired/invalid/already-used activation links show error state

Reviewers

@sahilds1 @taichan03

Notes

TODO: add FRONTEND_DOMAIN=balancerproject.org to prod config so activation and password reset email links point to the correct domain.

@amahuli03 amahuli03 requested review from sahilds1 and taichan03 April 10, 2026 15:33
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.

[auth]: registration and email activation

1 participant