Skip to main content
Back to Learn More

Authentication — Sign In, Sign Up & Password Reset

Overview

Interview OS uses Supabase Authentication for secure user identity management. The auth system supports email/password and Google OAuth, with session management, password reset, and security best practices.

Auth Flows

Sign Up

  1. Enter email, password, and display name
  2. Account created in Supabase Auth
  3. Profile record created automatically
  4. Redirected to onboarding or dashboard

Log In

  1. Enter email and password
  2. Session established with Supabase
  3. Redirect to dashboard

Google OAuth

  1. Click "Sign in with Google"
  2. Redirect to Google consent screen
  3. Callback creates/links account
  4. Redirect to dashboard

Forgot Password (/auth/reset-password)

  1. Enter email on login form
  2. Receive password reset email
  3. Click link → /auth/reset-password page
  4. Enter new password
  5. Confirmation and redirect to login

Sign Out

  • Available in sidebar footer (desktop) and mobile header
  • Clears Supabase session
  • Redirects to landing page

Session Management

  • Sessions are managed by Supabase Auth
  • useSession() hook provides session state across the app
  • AppShell component enforces auth guard — redirects to / if no session
  • Auth state is checked on every protected page

Security Features

Feature Implementation
Password Hashing Supabase Auth (bcrypt/scrypt)
OAuth State PKCE flow for Google OAuth
Session Tokens JWT with expiration and refresh
Rate Limiting Supabase Auth built-in rate limiting
Redirect Validation Forgot-password redirect_to derived from request headers

Error Handling

Error User Message
Invalid credentials "Invalid email or password"
Email already registered "An account with this email already exists"
Weak password Password strength requirements
Expired reset link "This link has expired. Request a new one"
OAuth failure "Google sign-in failed. Please try again"
Rate limited "Too many attempts. Please try again later"

Related Docs

  • [[landing]] — Auth panel is on the landing page
  • [[settings]] — Security settings, password change, session management
  • [[profile]] — Profile creation after sign-up
Based on INTOS-ES-P0-001 (Phase 0), INTOS-ES-P1-001 (Phase 1), INTOS-ES-P2-001 (Phase 2), INTOS-ES-P3-001 (Phase 3), and INTOS-ES-P4-001 (Phase 4) Engineering Specifications v1.0