Supabase Auth for login and session management.
- Email/password + Google OAuth
- Email verification
- Password reset
- Session persistence
- Protected routes
Middleware: src/middleware.ts
Protects: /dashboard, /journal, /profile
Redirects unauthenticated users to /auth/login
File: store/auth-store.ts
Methods: signIn, signUp, signInWithGoogle, signOut, resetPassword
Table: profiles
Trigger: Auto-creates profile on signup
RLS: Users access own profile only
auth/auth-form.tsx- Login/signupauth/protected-route.tsx- Route protectionhooks/use-auth.ts- Auth hook