Skip to Content
HomeLink Hub
Tenant Web App

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

RouteView / component fileAccess
/auth/signinsrc/components/login-form.tsxpublic
/auth/signupsrc/views/auth/signup.tsx, src/components/signup-form.tsxpublic
/auth/check-emailsrc/components/auth/check-email.tsxpublic
/auth/verify-emailsrc/components/auth/verify-mail.tsxpublic, reached from the verification email
/auth/forgot-passwordsrc/components/auth/forgot-password-form.tsxpublic
/auth/reset-passwordsrc/components/auth/new-password.tsxpublic, reached from the reset email
/auth/reset-successsrc/components/auth/reset-success.tsxpublic
/auth/google/callbacksrc/views/auth/google-callback.tsxpublic, Google redirects here
Modal on any pagesrc/components/auth/auth-modal.tsxpublic

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 token query 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.

  1. 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".
  2. 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").
  3. 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").
  4. 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.
  5. Create Account (reads "Creating Account..." while busy) fires POST /api/v1/auth/signup with firstName, lastName, email, phone and password.
  6. 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.
  7. On failure a toast shows the server's message, or "Registration failed".

Check your email and verify

  1. 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."
  2. Open Email App opens a bare mailto: link. "Remember your password? Log in" goes back to sign in.
  3. The emailed link opens /auth/verify-email?token=.... The page shows "Verifying your email..." and fires GET /api/v1/auth/verify-email?token=... once.
  4. 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/signin after 5 seconds.
  5. 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".

  1. 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".
  2. 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.
  3. Login (reads "Logging in..." while busy) fires POST /api/v1/auth/signin with email and password.
  4. On success the thunk stores data.accessToken in sessionStorage under token, data.refreshToken in localStorage under refreshToken, and data.user in localStorage under user; the Redux auth slice gets user and token. A toast shows the server's message.
  5. 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.
  6. 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

  1. Continue with Google fires GET /api/v1/auth/google. The response's data.authUrl is loaded in the same tab.
  2. Google redirects back to /auth/google/callback?code=...&state=..., which shows "Signing you in with Google..." and fires GET /api/v1/auth/google/callback with code and state as query params.
  3. On success the tokens and user are stored exactly as for password sign-in and the user lands on /.
  4. No code in 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

  1. Forgot password? opens "Forgot Password?" (route /auth/forgot-password, or in place in the modal). Field Email: valid email ("Enter a valid email address").
  2. Reset Password (reads "Sending..." while busy) fires POST /api/v1/auth/forgot-password with email.
  3. 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".
  4. 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.
  5. Update Password (reads "Updating..." while busy) fires POST /api/v1/auth/reset-password with token and password. A missing token shows the toast "Reset token is missing. Please use the link from your email." and sends nothing.
  6. 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

  1. Logout in the account menu (or mobile drawer) fires POST /api/v1/auth/signout with the stored refreshToken.
  2. Whether or not that call succeeds, the app removes token, refreshToken and user from storage and clears the Redux session.
  3. 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.loading is 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/signin from 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).

On this page