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.

auth header
auth header
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, 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.

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.signUpWithPassword({
    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.

Svelte kanban board

A Trello clone using Supabase as the storage system.

joshnuss GitHub profile picturejoshnuss

Next.js Realtime chat app

Next.js Slack clone app using Supabase realtime subscriptions

supabase GitHub profile picturesupabase

Next.js Subscription and Auth

The all-in-one starter kit for high-performance SaaS applications.

Vercel GitHub profile pictureVercel

Expo Starter

Template bottom tabs with auth flow (Typescript)

codingki GitHub profile picturecodingki

NestJS example

NestJS example using Supabase Auth

hiro1107 GitHub profile picturehiro1107

ReactJS realtime chat app

Example app of real-time chat using supabase realtime api

shwosner GitHub profile pictureshwosner

Vanilla-js Auth app

How to sign up and login using supabase and supabase-js using HTML and JavaScript only

supabase GitHub profile picturesupabase

React Native todo list app

React Native Todo List example with Expo

supabase GitHub profile picturesupabase

NextJS todo list app

NextJS todo list example

supabase GitHub profile picturesupabase

React todo list app

React todo List example

supabase GitHub profile picturesupabase

Svelte todo list app

Sveltejs todo with TailwindCSS and Snowpack

supabase GitHub profile picturesupabase

Vue.js todo list app

Vue.js todo app using TypeScript

supabase GitHub profile picturesupabase

Angular todo list app

Angular todo List example

geromegrignon GitHub profile picturegeromegrignon

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.

-- 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