Choosing an Auth Provider: Clerk, Auth0, Supabase Auth, Better Auth or Keycloak
Auth is the dependency you pick in week one and live with for years. Sign-in pages get rebuilt; the user table, the session format and the per-user bill don't move easily. So the useful question isn't "which SDK is nicest", it's "where do my users live, who runs the thing that checks passwords, and what does it cost at ten times today's sign-ups?"
This post compares five options people actually shortlist: Clerk, Auth0, Supabase Auth, Better Auth and Keycloak. Prices, limits and versions are as of November 2026, from each vendor's own pages.
The spectrum: who runs it, where users live
The five sit at different points on one axis:
- Clerk and Auth0 are hosted identity services. Their servers handle sign-in, their database holds the user records, and you pay per active user above a free allowance.
- Supabase Auth is a hosted service too, but per the Supabase Auth docs it stores users "in a special schema" of your own project's Postgres database and issues JWTs that work with Row Level Security. The docs also say you can use it as a standalone product.
- Better Auth is a library. The README calls it a "framework-agnostic authentication (and authorization) framework for TypeScript", MIT-licensed. Your app runs it, and your database holds its tables.
- Keycloak is an identity server you deploy yourself. The Keycloak site describes OpenID Connect, OAuth 2.0 and SAML support, identity brokering, and "built-in support to connect to existing LDAP or Active Directory servers." It's a CNCF incubation project, and the repo is Apache 2.0.
The numbers side by side
| Free allowance | First paid tier | Metric | |
|---|---|---|---|
| Clerk | 50,000 MRUs per app (Hobby) | Pro $25/mo ($20 billed annually) | Monthly retained users |
| Auth0 | Up to 25,000 MAUs | Essentials B2C $35/mo for 500 MAUs | Monthly active users |
| Supabase Auth | 50,000 MAUs on Free | Pro from $25/mo, 100,000 MAUs included | Monthly active users |
| Better Auth | No usage fees (MIT) | n/a | You pay for your own servers |
| Keycloak | No usage fees (Apache 2.0) | n/a | You pay for your own servers |
Sources: Clerk pricing, Auth0 pricing, Supabase pricing.
The metrics aren't the same, which is the first thing to check. Clerk bills on a "Monthly Retained User", defined as "a user who visits your app in a given month at least one day after signing up." Someone who signs up and never returns doesn't count. Auth0 and Supabase count monthly active users.
A few details that change the maths:
- Clerk charges $0.02 per MRU from 50,001 to 100,000, then sliding tiers down to $0.012. At 100,000 MRUs on Pro that's $25 + 50,000 × $0.02 = $1,025 a month. MFA, passkeys and removing Clerk branding are on Pro, not Hobby. One SSO connection is included on Pro, with more at $75 a month each. Basic organizations are free on every plan, capped at 100 monthly retained organizations and 20 members each.
- Auth0 prices climb steeply with MAUs on paid plans: the page shows Essentials B2C at $70 a month for 1,000 MAUs and Professional B2C at $545 a month for 2,500. Enterprise connections aren't available on the B2C Essentials or Professional plans; the B2B plans (from $150 a month) include them. The free plan covers up to 25,000 MAUs with one custom domain after credit-card verification.
- Supabase charges $0.00325 per MAU past 100,000 on Pro and Team. SAML SSO users are billed separately: 50 included, then $0.015 each. Free projects are "paused after 1 week of inactivity," which is fine for a side project and a surprise for a staging environment.
The Supabase Pro fee also covers the database and the rest of the platform, so it isn't a like-for-like auth price. If you're weighing Supabase as a whole, our Supabase vs Firebase comparison covers the rest.
Auth.js is now part of Better Auth
If your mental shortlist still includes NextAuth.js, it has moved. On 22 September 2025 Better Auth announced that Auth.js "is now being maintained and overseen by Better Auth team." Existing projects can keep running, and the team says it will "keep addressing security patches and urgent issues". The post makes no promise of new Auth.js features, and both it and the Auth.js README recommend that new projects start with Better Auth. The named exception is stateless sessions without a database. The latest next-auth v4 release on GitHub is 4.24.15, from July 2026.
Better Auth itself was at v1.7.18 on 5 November 2026 (releases). What you're signing up for is code in your repo and tables in your database. Per the database docs, the core schema is four tables (user, session, account, verification), with plugins adding more:
# Generate a Prisma or Drizzle schema (or a SQL file for Kysely)
npx auth@latest generate
# Apply migrations directly (built-in Kysely adapter only)
npx auth@latest migrate
That's the appeal and the cost in one. No per-user fee, no vendor holding your users, but also no vendor handling abuse protection, email delivery or the 2 a.m. incident for you. You own all of it.
Running Keycloak is a real job
Keycloak is what you reach for when the requirement is "our own identity provider": SSO across several internal apps, SAML to enterprise customers, users already in Active Directory. Starting a dev instance is one command, straight from the container guide:
docker run --name mykeycloak -p 127.0.0.1:8080:8080 \
-e KC_BOOTSTRAP_ADMIN_USERNAME=admin \
-e KC_BOOTSTRAP_ADMIN_PASSWORD=change_me \
quay.io/keycloak/keycloak:latest start-dev
Production is where it gets serious. The same guide says production mode uses "only secured HTTPS communication", that you "should explicitly specify the db" (KC_DB, KC_DB_URL and credentials), set a hostname, configure a TLS keystore and "always set the memory limit" for the container. Then you own upgrades: Keycloak shipped 26.8.2 on 5 November 2026, and keeping up with releases is part of the deal. If nobody on the team wants that pager, it's the wrong choice regardless of licence.
Questions that decide it
Before comparing SDKs, answer these:
- Do enterprise customers need SAML or OIDC SSO into your app? Check which plan includes enterprise connections. On Auth0 that means the B2B plans; on Clerk, Pro includes one connection; Supabase bills SSO users separately; Keycloak and Better Auth make it your configuration work.
- Is your data already in Supabase Postgres? Then Supabase Auth plus RLS is the shortest path, because the token it issues plugs straight into your RLS policies.
- Do you need users in your own database for compliance or joins? Better Auth or Keycloak. With a hosted provider you keep a copy of the users you need in your own tables; the "Do you need a users table?" section of our Clerk with Next.js post walks through that trade-off.
- What does 10× growth cost? Run the per-user maths above for your realistic numbers. Per-user pricing is cheap at 1,000 users and a budget line at 500,000.
- How would you leave? Ask any hosted provider, before you sign, how you export users and whether password hashes come with them. If they don't, migrating later means forcing password resets.
Whatever you pick, the protocol mistakes are the same. Our OAuth implementation mistakes and JWT security mistakes posts cover what goes wrong in your code, not the provider's, and the JWT decoder is handy for checking what claims a provider actually puts in its tokens. For password policy on self-run options, see Password Security in 2026.
If you want an AI assistant to manage Auth0 tenants or Supabase projects during development, there are MCP servers for both: Auth0 and Supabase. Give them a dev tenant, not production.
A decision rule
- B2C or early-stage SaaS on a JavaScript stack, want it working this week: Clerk. The 50,000-MRU free tier and retained-user metric are generous.
- Already on Supabase: Supabase Auth. It's in the plan you're paying for and it plugs into RLS.
- B2B with enterprise SSO from day one and budget for it: Auth0's B2B plans, or Clerk Pro with paid SSO connections. Price both at your expected MAUs.
- TypeScript app, users must live in your database, no per-user fees: Better Auth. If you're on Auth.js today, plan a migration rather than starting anything new on it.
- You need to be the identity provider for several apps, or you're integrating LDAP/AD: Keycloak, if someone will own it in production.
If two options tie, pick the one that's easier to leave.
Written by AIDToolStack Editorial
Researched from official documentation, specifications and vendor pages, listed under Sources below. Last checked November 2026.
Sources
- supabase.com/docs/guides/auth
- github.com/better-auth/better-auth
- www.keycloak.org/
- github.com/keycloak/keycloak
- clerk.com/pricing
- auth0.com/pricing
- supabase.com/pricing
- www.better-auth.com/blog/authjs-joins-better-auth
- github.com/nextauthjs/next-auth
- github.com/better-auth/better-auth/releases
- www.better-auth.com/docs/concepts/database
- www.keycloak.org/server/containers
- github.com/nextauthjs/next-auth/releases
- github.com/keycloak/keycloak/releases
Related Posts
Explore on AIDToolStack
Discover tools and servers featured in our directory.
AI Tools
MCP Servers
Sponsor Our Newsletter
Reach thousands of developers who are actively evaluating AI tools, MCP servers, and dev infrastructure. Our weekly newsletter goes to engaged technical decision-makers.
All sponsored content is clearly labeled per our editorial policy.