HomeToolsAbout

Auth

How Authentication works in Supabase

Setup

Manu > Authentication > Create

Optionally add Providers after creation step.

Providers are auth services like Phone (Twillio), Google, Apple, etc.

In Database where you want to make a column user_id which would be a foreign key to auth.uid().

Then, you can enable RLS policy.

  • Click Get started quickly.

In the policy creation page, define which CRUD operation each role group would be allowed to perform.

Using Expression is for queries with WHERE.

  • This type of policy defines what data can be accessed (e.g., selecting rows).
  • It restricts which rows are visible to the user (read).

With Check Expression is for Mutation.

  • For insert (creation) and update (update)
  • It restricts what can be written to the table.
AboutContact