Platform

Authentication

Consumo uses Supabase Auth for sessions. Protected routes and API handlers rely on the signed-in user to scope data with Row Level Security.

How it works

The app uses the Supabase SSR client with cookies. Middleware refreshes the session on navigations outside the public marketing routes.

Signing in

Users authenticate via /auth/login (OAuth or email, depending on your Supabase configuration). After login, the dashboard and authenticated API routes receive the user context.

API requests

Browser

Call app API routes with credentials: "include" so session cookies are sent (e.g. usage ingest from the same origin).

Server or scripts

For server-to-server usage, extend the product with a service token or forward the user JWT — not included in the default template.

Profiles

The dashboard layout reads optional profile fields from a profiles table when present.

Ensure RLS policies on your tables only allow auth.uid() to access matching rows.