Supabase8 min readUpdated November 23, 2026

How Does Supabase Auth Work?

Auth is a JWT issuer that talks to your database. The token carries the user, and row level security decides what that user can read.

Supabase Auth issues JSON Web Tokens and stores users in a schema inside your own Postgres database. The token carries the user id, and row level security policies use it to scope every query. The Free plan includes 50,000 monthly active users; Pro includes 100,000, then $0.00325 per MAU.

Supabase Auth is a service that authenticates users and issues a JSON Web Token. When a user signs in, Auth verifies the credentials and returns a token. The client sends that token with every request to the database.

How does Supabase Auth work under the hood?

Supabase Auth is a service that authenticates users and issues a JSON Web Token. When a user signs in, Auth verifies the credentials and returns a token. The client sends that token with every request to the database.
The users live in a schema inside your own Postgres database, not in a separate system you cannot query. That means you can join your app tables to the auth users table with a foreign key. It is a small thing that saves a lot of glue code. The token is the bridge to authorization. It carries the user id, and row level security policies read that id to scope every query. Auth proves who the user is. RLS decides what they can touch. Together they cover authentication and authorization without a separate permissions service.

Which sign-in methods does Supabase Auth support?

Supabase Auth supports email and password, magic links, and one-time passwords. For social sign-in it supports Google, GitHub, Apple, Microsoft, Discord, Slack, and a long list of others. Phone sign-in works through Twilio, MessageBird, or Vonage.
For enterprise, it supports SAML 2.0 single sign-on and custom OAuth or OIDC providers. That covers the usual enterprise requirement without a separate identity vendor. You can also bring your own auth. Supabase accepts JWTs from Clerk, Auth0, Firebase Auth, Cognito, and WorkOS as third-party providers. That is useful when you already have an identity system and only want the database.

How is Supabase Auth priced?

Auth is billed by monthly active users. The Free plan includes 50,000 MAU. Pro includes 100,000 MAU, then $0.00325 per additional MAU. A monthly active user is a user who signs in or refreshes a token during the month.
SSO MAU and third-party MAU are billed separately from standard MAU, and advanced MFA over phone is its own add-on. For most apps, the standard MAU number is the one that matters. The number to watch is not the count, it is the definition. A user who stays signed in and refreshes a token counts as active. If your app keeps sessions alive for months, your MAU is close to your total user count, not your monthly logins. That is worth modeling before you launch.

How does Supabase Auth connect to row level security?

Auth and RLS are two halves of one system. Auth issues a token with the user id. RLS policies read that id with auth.uid() and add a WHERE clause to every query. A policy like using (auth.uid() = user_id) means a user only ever sees their own rows.
The failure mode is shipping Auth without RLS. If a table has no RLS enabled and the anon or authenticated role has a grant, every signed-in user can read every row. We have seen this in production more than once, and it is the single most common Supabase security mistake. The fix is a habit: every table in an exposed schema gets RLS enabled and its default grants revoked in the same migration that creates it. Then you test it. The Supabase CLI runs a pgTAP suite that asserts allow and deny for each role, so you know the policies do what you think.

How do I add MFA and SSO to Supabase Auth?

Multi-factor authentication is built in. You can require TOTP for any user, and phone-based MFA is available as an add-on. For an admin panel or a sensitive action, requiring a second factor is a few lines of configuration, not a project.
Enterprise SSO uses SAML 2.0. You configure the identity provider and Supabase handles the flow. SSO users are billed as SSO MAU, which is separate from standard MAU, so model the cost if you have a large enterprise customer base. Auth Hooks let you run a Postgres function at key points in the lifecycle, like before a user is created or after they sign in. That is where you put custom claims, audit logging, or a check against your own allowlist. It keeps the logic in the database, next to the data it protects.

4 Tips to Get Started

1

Use the @supabase/ssr package for server-rendered apps. It handles the cookie and token refresh correctly, which hand-rolled code usually does not.

2

Write RLS policies before you ship, not after. Auth without RLS means every signed-in user can read every row.

3

Set a short access token lifetime and rely on refresh tokens. It limits the damage of a leaked token.

4

Turn on MFA for admin accounts. TOTP is built in and costs nothing extra on the standard plan.

Ready to Stop Worrying About Infra?

Knowledge is the first step. Get a free 1-hour diagnostic and see where your infrastructure leaks time, money, and focus.

Sources & References

roqy.io cites authoritative sources including engineering blogs, vendor documentation, industry surveys, and academic research to ensure accuracy.

R

Ron Cohen — Founder & DevOps Engineer

Content reviewed by the roqy.io team. Our guides are based on publicly available data and cited sources above.

Disclaimer: This content is for informational and educational purposes only. It does not constitute professional advice or a guarantee of specific results. Infrastructure needs vary by team, stack, and stage. Consult a qualified engineer for advice tailored to your situation.

Frequently Asked Questions

How does Supabase Auth work?

Supabase Auth authenticates users and issues a JSON Web Token. The token carries the user id and is sent with every request. Row level security policies read the user id from the token and scope each query to that user's rows.

How much does Supabase Auth cost?

The Free plan includes 50,000 monthly active users. Pro includes 100,000 MAU, then $0.00325 per additional MAU. SSO and advanced MFA are separate add-ons with their own pricing.

Which auth providers does Supabase support?

Email and password, magic link, one-time password, social sign-in with Google, GitHub, Apple, and others, phone sign-in through Twilio, MessageBird, or Vonage, and enterprise SSO with SAML 2.0. Custom OAuth and OIDC providers are also supported.

Does Supabase Auth work with row level security?

Yes, and that is the point. Auth issues the token, and RLS policies use auth.uid() from that token to decide which rows a user can read or write. The two are designed to work together.

Get the DevOps Ecosystem Behind You

One accountable engineer. Full platform behind him. Month-to-month, no lock-in.