feat/public self-registration + sign-in/sign-up pages - #48
Merged
Conversation
…password validation
…ublic user registration; extracted user creation into helper function
…hone is not formatted correctly; added phone to RegisterRequest
…e; add current user patch route
…issing profile fields property to UserResponse to indicate incomplete profile
…thRegister interface with phone field; update User interface with new fields
…line on the email field
…ror when changing field
…helper functions to auth.ts
…ull validator on UserUpdate
…uni, major, year level, grad year); add ProfileQuestion element; add User updateMe route; add error prop to Select element
…put element in place of text box
…hat sends user update PATCH to backend
19 tasks
ethnjs
temporarily deployed
to
feat/signin-and-signup - nexus PR #48
July 25, 2026 10:47 — with
Render
Destroyed
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
🚅 Deployed to the nexus-pr-48 environment in nexus
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Previously, registration was admin-only. This pivots to public self-registration — volunteers and TDs both create their own accounts. Everyone gets
role="user"on signup; admin role is assigned separately.Changes
Backend
POST /auth/register/— public self-registration; validates password (8+ chars, upper/lower/number/symbol, no control chars); role hardcoded to"user"; logs the user in immediately (httpOnly JWT cookie); returnsUserResponsePOST /admin/auth/register/— admin-only account creation; no password field;is_active=Falseon creation; email activation handled in a separate issue_create_user()helper for both routes;check_if_email_exists()for duplicate email checksUserUpdateschema (self-service; excludesrole/is_active, but does allow changingemail) andAdminUserUpdateschema (admin only —role,is_active)PATCH /users/me/— self-service profile update,exclude_unset=TruesemanticsPATCH /admin/users/{user_id}/— admin-only role/active-status updatemissing_profile_fieldscomputed field onUserResponse— returns list of specific missing field namesnormalize_phone()(renamed fromformat_phone_us) — now returns raw digits and raisesValueErroron unparseable input, instead of formatting with a graceful fallback; also updates howsync_service.pynormalizes phone numbers pulled from Google Sheetsyear_level/graduation_yeartousers; makefirst_name/last_nameNOT NULLFrontend —
/sign-upinSignUpFlowcookie preserves step 2 on navigation away mid-flow/dashboardPOST /auth/register/for step 1,PATCH /users/me/for step 2lib/auth.ts(email/phone/password validation),Textareacomponent,(auth)/layout.tsxroute-group layoutFrontend —
/sign-inPOST /auth/login//sign-upyetFrontend — shared components
Input,RadioOption,Selectreworked: default font switched to mono,RadioOptionlabel click now also triggersonChange(previously only the radio input itself did)IconCheckCircleSolid,IconXCircleSolid) for the password checklistTesting
main, no dependency on later commits from the source branchNotes / follow-ups
proxy.tshandles auth redirects for both/sign-inand/sign-upis_active=False, no password) rely on an email activation flow that is a separate issue (confirmed: no partial implementation exists yet)normalize_phone()behavior change: now raises on invalid input instead of falling back — double-check this doesn't break sheet-sync on malformed phone datafirst_name/last_name— no visible backfill step; confirm existing rows are clean before this runs against prod dataUserUpdate.reject_nullvalidator rejects explicitnullfor name/email/phone — this seems to contradict the "explicit null clears a field" semantics described inupdate_user_me's docstring; worth confirming intended behavior