Prepare for the PgBouncer and IPv4 deprecations on 26th January 2024

Learn more
Authentication

Open Source Auth
(with tons of integrations)

Every Supabase project comes with a complete User Management system that works without any additional tools.

Including PostgreSQL's policy engine, for fine-grained access rules.

apple auth login icon
bitbucket auth login icon
discord auth login icon
facebook auth login icon
gitlab auth login icon
google auth login icon
messagebird auth login icon
microsoft auth login icon
slack auth login icon
spotify auth login icon
twitch auth login icon
twitter auth login icon
twilio auth login icon

All the social providers

Enable social logins with the click of a button. Google, Facebook, GitHub, Azure (Microsoft), Gitlab, Twitter, Discord, and many more.

Fully integrated

Incredibly simple Auth, without a single external authentication service. Built-in Authentication, Authorization, and User Management.

Own your data

User data stored in your Supabase database so you never have to worry about 3rd party privacy issues. Host your data in 8 different locations.

Simple APIs

APIs that you can understand. With powerful libraries that work on client and server-side applications.

Explore documentation

Enterprise logins

Support for SAML, Azure. More enterprise providers and SSO coming soon.

Social login scopes

Request additional user data permissions when using social logins.


  // Sign up with email
  const { user, error } = await supabase.auth.signUp({
    email: 'example@email.com',
    password: 'example-password',
  })













      

  // Sign in with email
  const { user, error } = await supabase.auth.signIn({
    email: 'example@email.com',
    password: 'example-password',
  })












      

  // Sign in with magic links
  const { user, error } = await supabase.auth.signIn({
    email: 'example@email.com'
  })





  








      

  // Sign in with GitHub
  // And request extra permissions!
  const { user, error } = await supabase.auth.signIn({
    provider: 'github',
  }, {
    scopes: 'repo gist notifications'
  })












      

Community driven examples, libraries and guides

Supported by a network of early advocates, contributors, and champions.

User permissions without the middleware

Supabase Auth works without any additional servers. Build Authorization rules with Postgres' Row Level Security, controlling who can create, edit and delete specific rows in your database.

Policies can be written in SQL or using the dashboard online.

Explore documentation
-- 1. Create table
create table profiles (
  id serial primary key,
  name text
);

-- 2. Enable RLS
alter table profiles enable row level security;

-- 3. Create Policy
create policy "Public profiles are viewable by everyone." 
on profiles for select 
using ( true );
-- 1. Create table
create table profiles (
  id serial primary key,
  name text
);

-- 2. Enable RLS
alter table profiles enable row level security;

-- 3. Create Policy
create policy "Users can update their own profiles." 
on profiles for update 
using ( auth.uid() = id );
create table teams (
  id serial primary key,
  name text
);

create table members (
  team_id references team.id,
  user_id referenced auth.users.id
);

alter table teams enable row level security;

-- Create Advanced Policies
create policy "Team members can update team details"
on teams
for update using (
  auth.uid() in ( 
    select user_id from members 
    where team_id = id 
  )
);

Public profiles are viewable by everyone

Create a policy that allows public access to a table

Users can update their own profiles

Create a policy that only allows a user to update rows that match their unique ID

Team members can update team details

Create a policy that allows for team members to update only rows which match their team ID.

Acme Industries

Sign in today for Supa stuff

Auth UI

Pre-built auth widgets to get started in minutes.

Customizable authentication UI component with custom themes and extensible styles to match your brand and aesthetic

react icon
React only. Other frameworks coming soon.

Build in a weekend, scale to millions