Before setting up our database table, let’s look at Supabase’s built-in authentication system.
Understanding Supabase Authentication
- Navigate to Authentication: In the left menu, click on “Authentication”.
- No Users Table Needed: Unlike our custom back-end, where we created a
userstable manually, Supabase handles user management automatically. - Built-in Features: Supabase provides user registration, login, email confirmation, password reset, and session management out of the box.
Key Authentication Features
Users Management
- Supabase automatically creates and manages user records.
- Each user gets a unique UUID identifier (not an integer like our custom system).
- User data is stored in a
userstable in theauthschema, whereas the tables we create will be in thepublicschema.
Email Confirmation
- Email verification is enabled by default.
- Users receive confirmation emails automatically.
- No custom email sending code required.
Manual User Creation
- In the Authentication dashboard, you can manually create users using the “Add user” button.
- Useful for testing or creating admin accounts.
Important: This automatic user management means that when we create our posts table, we’ll reference users by their UUID from Supabase’s auth system, not from a custom users table.