HTTP reference

API — Authentication & session helpers

Route Handlers under src/app/api. Non-public routes expect a Supabase session cookie. Admin routes also require profiles.role = admin.

PublicCallable without a session where the handler allows it.Signed inRequires a signed-in user.AdminAdmin role on your profile.

Back to API overview

MethodsPathAccessSummary
POST/api/auth/loginPublicEmail/password sign-in; sets session cookies.
POST/api/auth/logoutPublicClear Supabase session cookies.
GET/api/auth/sessionPublicLightweight session probe for the client.
POST/api/auth/email-registeredPublicCheck whether an email is already registered (signup UX).
POST/api/auth/update-passwordPublicComplete password reset when recovery session is present.Typically used after magic link / recovery flow.
PATCH/api/auth/meSigned inUpdate lightweight auth-adjacent profile fields (e.g. UI language).