Authentication
Cadrant uses Supabase Auth to add a complete authentication system to your application. Signup, login, session management and access control are configured automatically.
Available features
- Signup and login with email and password.
- OAuth provider login (Google, GitHub, etc.) configurable in Supabase.
- Automatic user session management (tokens, expiration, refresh).
- Login and signup pages generated automatically by Cadrant.
Enable authentication
- Make sure Supabase is connected to your project.
- Ask Cadrant to add authentication in your prompt (e.g.: 'Add a login system with email signup').
- Cadrant generates login/signup pages, configures Supabase Auth and protects necessary routes.
- To enable OAuth logins (Google, GitHub), configure providers directly in your Supabase dashboard under Authentication > Providers.
Access control
Combine authentication with RLS policies for granular access control:
- Protect entire pages (e.g.: dashboard accessible only to logged-in users).
- Filter data by user (e.g.: each user only sees their own data).
- Create custom roles (admin, editor, reader) via columns in your users table.
For an advanced role system, describe the desired logic in your prompt. For example: 'Admins can edit everything, editors can create and edit, readers can only view.'