Before setting up our database table, let’s look at Supabase’s built-in authentication system.

Understanding Supabase Authentication

  1. Navigate to Authentication: In the left menu, click on “Authentication”.
  2. No Users Table Needed: Unlike our custom back-end, where we created a users table manually, Supabase handles user management automatically.
  3. 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 users table in the auth schema, whereas the tables we create will be in the public schema.

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.


Tags: