Authentication for web apps: Clerk vs Auth.js vs Supabase Auth
Clerk is fastest to add, Better Auth (now home of Auth.js) keeps users in your database, Supabase Auth suits Supabase apps. Prices and how to choose.
By Sohail Hussain21 November 20266 min read
For a Next.js web app in 2026, choose Clerk if you want sign-in, user management and team accounts working in a day and accept per-user pricing once you pass 50,000 retained users. Choose Better Auth, which took over the Auth.js project in 2025, if you want users stored in your own database with no per-user fee and are happy to build the sign-in screens. Choose Supabase Auth if your app already runs on Supabase, because it ties directly into the database's access rules. All three are sound; the right one depends on where you want user data to live and how much you want to build.
One change matters before comparing. In September 2025 the Auth.js project, formerly NextAuth.js, became part of Better Auth. The announcement says existing Auth.js users will keep receiving security patches and urgent fixes, and recommends that new projects start with Better Auth. If you are choosing today, compare Better Auth, not Auth.js.
How do the three options compare?
| Clerk | Better Auth (and Auth.js) | Supabase Auth | |
|---|---|---|---|
| What it is | Hosted auth and user management service | Open-source TypeScript library | Auth service built into Supabase |
| Where users live | Clerk's servers; sync to your database by webhook | Your own database | Your Supabase PostgreSQL database |
| Price, as of October 2026 | Free up to 50,000 monthly retained users per app; Pro from $25 a month | Free and open source; you pay for the database and email | In the Supabase plan: 50,000 monthly active users free, 100,000 on the $25 Pro plan |
| Sign-in screens | Prebuilt components | You build them | You build them, with helper libraries |
| Teams and organisations | Built in; 100 organisations free, B2B add-on beyond | Organisation plugin | Build your own tables and policies |
| Multi-factor | Pro plan | Plugin | Authenticator apps and phone |
| Enterprise SSO (SAML) | One connection on Pro, more as paid extras | SSO plugin | Pro plan and above |
| Effort to add | Hours | One to three days | Hours, if already on Supabase |
| Lock-in | Highest | Lowest | Moderate |
Prices are from Clerk's pricing page and Supabase's pricing page. Clerk bills on monthly retained users, which counts a user only if they come back at least a day after signing up, so one-time sign-ups do not count.
Authentication is one of the first decisions in every web app and SaaS build we do, because it shapes the users table, the session model and how every page checks access.
When is Clerk the right choice?
- You want to ship this week. Drop in the sign-in and user profile components, wrap the app, and you have email, social login, sessions, password reset and a user management dashboard.
- Your product is B2B with teams. Organisations, invitations and roles are built in, and the free tier covers the first hundred customer organisations.
- You do not want to own auth security. Bot protection, breached password checks, session management and multi-factor are Clerk's job.
The trade-offs: user records live on Clerk's servers, so you sync them to your database with webhooks. Pricing rises with users beyond the free allowance, and multi-factor needs a paid plan. For a product with a high price per customer that rarely matters. For a consumer app with hundreds of thousands of free users it is a real line in the budget.
When is Better Auth the right choice?
- You want users in your own database. Users, sessions and accounts are tables you own, alongside your other data. No sync, no webhooks, no per-user bill.
- You expect many users at a low price each. Consumer apps and freemium products avoid costs that scale with sign-ups.
- You need something unusual. Custom session rules, unusual sign-in methods or tight control over every screen are easier when the code is yours.
The trade-offs: you build and style the sign-in, sign-up, reset and account screens, and you own the operational side: email delivery, rate limits and keeping the library updated. Its plugins cover two-factor authentication, passkeys, organisations and SSO, so the gap with hosted services is mostly in the interface and the admin dashboard.
If you already run Auth.js, there is no emergency. It still works and still gets security fixes. Plan a move to Better Auth when you next do significant work on authentication.
When is Supabase Auth the right choice?
- Your database is Supabase. The signed-in user's ID is available inside PostgreSQL, so row level security policies can say "a user can read rows for accounts they belong to" and the database enforces it. That pairing is the main reason to choose it.
- You want one bill and one console. Auth, database, storage and functions in one place.
The trade-offs: no prebuilt organisation model, so team accounts are your own tables and policies. And it makes most sense inside Supabase; using it with a separate database loses its main advantage. Supabase vs Firebase covers the platform decision.
What about Auth0, WorkOS, Firebase and the rest?
They are all reasonable. Auth0 is mature and strong on enterprise features, priced for companies that need them. WorkOS focuses on enterprise SSO and directory sync and is a common add-on for B2B products that start selling to large companies. Firebase Authentication is the natural choice inside a Firebase app. Kinde and Stytch are newer hosted options with Next.js support. The Next.js authentication guide lists these alongside Clerk, Better Auth and Supabase.
Judge any of them on the same questions: where do users live, what does it cost at ten times your current users, can you export users including password hashes, and does it support the sign-in methods your customers expect.
Whichever you choose, what do you still have to build?
Authentication tells you who someone is. Authorisation, deciding what they may see and do, is always yours.
Check access on the server, close to the data. In Next.js 16, the proxy.ts file (renamed from middleware) is useful for quick redirects of signed-out users, but the Next.js docs are clear that it should not be the only check. Verify the session and the user's permission in the server code that reads or changes data, every time.
Keep your own users table. Store your own user ID, the provider's ID and your app-specific fields. Link everything else to your ID. This makes switching providers later a contained job.
Scope every query to the account. In a multi-customer product, a missing account filter is the most common serious bug. Multi-tenant SaaS architecture shows how to make the database enforce it.
Know what is in your tokens. If a provider issues JSON Web Tokens, paste one into our JWT decoder during development to see exactly which claims it carries and when it expires. Never put secrets or sensitive personal data in a token; anyone holding it can read it.
The pillar guide on how to build a SaaS product shows where auth fits among the other early decisions, and choosing a SaaS tech stack covers the rest of the stack around it.
Was this guide useful?