Sign Up and Sign In
Account creation, email verification, password and Google sign-in, password reset and sign-out, on the standalone pages and in the auth modal.
The same forms are used in two places: as full pages under /auth/*, and inside a modal that opens over whatever page the visitor is on. In the modal, switching between sign in, sign up and forgot password happens in place; on the standalone pages the same links navigate between routes.
Where it lives
| Route | View / component file | Access |
|---|---|---|
/auth/signin | src/components/login-form.tsx | public |
/auth/signup | src/views/auth/signup.tsx, src/components/signup-form.tsx | public |
/auth/check-email | src/components/auth/check-email.tsx | public |
/auth/verify-email | src/components/auth/verify-mail.tsx | public, reached from the verification email |
/auth/forgot-password | src/components/auth/forgot-password-form.tsx | public |
/auth/reset-password | src/components/auth/new-password.tsx | public, reached from the reset email |
/auth/reset-success | src/components/auth/reset-success.tsx | public |
/auth/google/callback | src/views/auth/google-callback.tsx | public, Google redirects here |
| Modal on any page | src/components/auth/auth-modal.tsx | public |
State and requests: src/services/auth/auth-slice.ts and auth-thunk.ts.
Before you start
- No preconditions to sign up. The form does not ask for a role and sends none; this app only creates tenant-side accounts.
- Email verification and password reset both arrive as emailed links that carry a
tokenquery parameter. - The modal is opened by: Sign up / Log in in the navbar, Get Started on Pricing, the wishlist heart when signed out, and the Sign In button of the "Sign In Required" alert on a property page.
Flow
Sign up
The form is titled "Create your account." and runs in three steps with a Step N of 3 progress bar.
- Step 1, Email. Field Email Address: must be a valid email ("Enter a valid email address"). Continue validates this step only. This step also offers Continue with Google and "Already have an account? Log in".
- Step 2, Your details.
- First Name: at least 2 characters ("First name must be at least 2 characters").
- Last Name: at least 2 characters ("Last name must be at least 2 characters").
- Phone Number: at least 7 characters ("Phone number is too short") and only digits, spaces, brackets and hyphens with an optional leading plus, pattern
^\+?[\d\s()-]+$("Enter a valid phone number").
- Step 3, Create a password.
- Password: at least 8 characters ("Password must be at least 8 characters"). No other complexity rule is enforced on this form.
- Confirm Password: required ("Please confirm your password") and must match ("Passwords do not match").
- From step 2 on, the chosen email is shown in a summary row with a Change link back to step 1, and a Back button appears.
- Create Account (reads "Creating Account..." while busy) fires
POST /api/v1/auth/signupwithfirstName,lastName,email,phoneandpassword. - On success a toast shows the server's message. On the standalone page the user lands on
/auth/check-email; in the modal the view switches to the same "check your email" content. Nothing is stored yet: the user is not signed in. - On failure a toast shows the server's message, or "Registration failed".
Check your email and verify
- The check-email screen reads "Verify your Email." with "We sent a verification link to your email address. Click the link to activate your account. Don't forget to check your spam folder."
- Open Email App opens a bare
mailto:link. "Remember your password? Log in" goes back to sign in. - The emailed link opens
/auth/verify-email?token=.... The page shows "Verifying your email..." and firesGET /api/v1/auth/verify-email?token=...once. - Success: "Email Verified!" with the server's message (default "Email verified successfully. You can now sign in."), a Log in now button, and an automatic redirect to
/auth/signinafter 5 seconds. - Failure: "Verification Failed" with the server's message (default "Invalid or expired verification link.") and Back to Sign In. A link with no token shows "Verification token is missing. Please use the link from your email."
Resend Email does nothing
The Resend Email button on the check-email screen has no click handler, in both the signup and the forgot-password variants. To get a new email the user has to submit the original form again.
Sign in with email and password
The form is titled "Welcome Back" with the subtitle "Log in to manage your listings and clients".
- Email step. Field Email: valid email ("Enter a valid email address"). Continue moves to the password step. Also on this step: Continue with Google and "Don't have an account? Sign up".
- Password step. The email is shown with a Change link. Field Password: required ("Password is required"), with a show/hide toggle and a Forgot password? link.
- Login (reads "Logging in..." while busy) fires
POST /api/v1/auth/signinwithemailandpassword. - On success the thunk stores
data.accessTokeninsessionStorageundertoken,data.refreshTokeninlocalStorageunderrefreshToken, anddata.userinlocalStorageunderuser; the Reduxauthslice getsuserandtoken. A toast shows the server's message. - Next: on the standalone page the user is sent to
/(the home page, now with the signed-in hero). In the modal, the modal closes and the user stays where they were. - On failure a toast shows the server's message, or "Login failed".
Remember me is cosmetic
The Remember me checkbox is not connected to anything. The access token always goes to sessionStorage, so it never survives closing the tab.
Sign in with Google
- Continue with Google fires
GET /api/v1/auth/google. The response'sdata.authUrlis loaded in the same tab. - Google redirects back to
/auth/google/callback?code=...&state=..., which shows "Signing you in with Google..." and firesGET /api/v1/auth/google/callbackwithcodeandstateas query params. - On success the tokens and user are stored exactly as for password sign-in and the user lands on
/. - No
codein the URL: toast "Google sign-in failed. No authorization code received." and a redirect to/auth/signin. A failed exchange: toast with the server's message or "Google sign-in failed.", then/auth/signin.
Forgot and reset password
- Forgot password? opens "Forgot Password?" (route
/auth/forgot-password, or in place in the modal). Field Email: valid email ("Enter a valid email address"). - Reset Password (reads "Sending..." while busy) fires
POST /api/v1/auth/forgot-passwordwithemail. - On success the check-email screen shows "Check your Email." and "We sent a password reset link to your email address. Please check your inbox (and spam folder)." On failure a toast shows the server's message or "Failed to send reset email".
- The emailed link opens
/auth/reset-password?token=..., titled "Create New Password".- New Password: at least 8 characters ("Password must be at least 8 characters"), one lowercase letter ("Must contain at least one lowercase letter"), one uppercase letter ("Must contain at least one uppercase letter"), one number ("Must contain at least one number") and one of
@$!%*?&("Must contain at least one special character (@$!%*?&)"). - Confirm New Password: must match ("Passwords do not match").
- A live Security Requirements checklist ticks "8+ characters", "At least 1 number." and "At least 1 special character." It does not list the uppercase and lowercase rules, which are still enforced on submit.
- New Password: at least 8 characters ("Password must be at least 8 characters"), one lowercase letter ("Must contain at least one lowercase letter"), one uppercase letter ("Must contain at least one uppercase letter"), one number ("Must contain at least one number") and one of
- Update Password (reads "Updating..." while busy) fires
POST /api/v1/auth/reset-passwordwithtokenandpassword. A missing token shows the toast "Reset token is missing. Please use the link from your email." and sends nothing. - Success lands on
/auth/reset-success: "Password Reset Successful", Log in now (to/auth/signin) and Back to Home Link Hub (to/). Failure shows a toast with the server's message or "Failed to reset password".
Sign out
- Logout in the account menu (or mobile drawer) fires
POST /api/v1/auth/signoutwith the storedrefreshToken. - Whether or not that call succeeds, the app removes
token,refreshTokenanduserfrom storage and clears the Redux session. - The user stays on the current page, which re-renders in its signed-out state. Stored notifications and the tour-seen flag are not cleared.
States and edge cases
- Buttons while busy. Submit buttons and Continue with Google are disabled while
auth.loadingis true. - Field errors appear under the field after a failed step and are re-checked as the user types.
- Already signed in. The
/auth/*pages do not redirect a signed-in user away; the forms still work and simply replace the session. - Expired session. A 401 response whose message mentions "token" clears the session and hard-redirects to
/auth/signinfrom anywhere in the app. There is no automatic token refresh. - Modal-only flows. Email verification and choosing a new password always happen on the standalone pages, because they start from an emailed link.
- Password rules differ by screen. Sign-up needs 8 characters, reset needs 8 characters plus mixed case, a number and a symbol, and the in-account change form needs only 4 characters (see Account and settings). The backend may apply its own rules on top.
What happens next
- After sign-up the backend emails a verification link (the check-email copy says so; sending happens server-side).
- After a successful sign-in on
/app, a first-time user gets the app tour described in the overview. - The notification socket is only opened when the app starts with a token already stored, so live notifications begin after the next full page load following sign-in (see Notifications).