Skip to content

Latest commit

 

History

History
51 lines (29 loc) · 758 Bytes

File metadata and controls

51 lines (29 loc) · 758 Bytes

Authentication

Supabase Auth for login and session management.


Features

  • Email/password + Google OAuth
  • Email verification
  • Password reset
  • Session persistence
  • Protected routes

Protected Routes

Middleware: src/middleware.ts

Protects: /dashboard, /journal, /profile

Redirects unauthenticated users to /auth/login


Store

File: store/auth-store.ts

Methods: signIn, signUp, signInWithGoogle, signOut, resetPassword


Database

Table: profiles

Trigger: Auto-creates profile on signup

RLS: Users access own profile only


Components

  • auth/auth-form.tsx - Login/signup
  • auth/protected-route.tsx - Route protection
  • hooks/use-auth.ts - Auth hook