Why I ship every SaaS on Better Auth instead of Clerk or NextAuth. Where your users live, what each option costs at scale, and when Clerk is still the right call.
Every product I have shipped this year uses Better Auth. That includes Tkit.ai, a support inbox and chat widget running on Cloudflare Workers, and Webhook Delivery, a webhooks service on the same stack. When I start a new project, auth is the one decision I no longer spend time on.
So this is not a neutral feature-by-feature comparison. It is the reasoning behind a choice I keep making, how it differs from Clerk and NextAuth, and an honest list of the cases where I would tell you to pick Clerk instead.
The short answer
- Pick Better Auth if your users should live in your own database, you need multi-tenant organizations, roles, or custom sign-up rules, or you deploy somewhere other than a plain Node server (Cloudflare Workers, Bun, Deno). You will build your own sign-in UI.
- Pick Clerk if you want polished, prebuilt sign-in, user profile, and organization screens today, you do not want to think about sessions, bot protection, or email deliverability, and per-user pricing past 50,000 retained users is fine for your business.
- Do not start a new project on NextAuth (Auth.js). Its maintainers, who are now the Better Auth team, say the same thing.
The rest of this post explains why I land on Better Auth almost every time.
Better Auth is a framework, not a vendor
The way I think about it: Clerk is a service you call, and Better Auth is code you run.
Better Auth calls itself an authentication framework, and that is accurate. Its core is small: email and password, social sign-in, sessions, and a database adapter. Everything else is a plugin you opt into. The plugin list covers two-factor auth, passkeys, magic links, email OTP, organizations, admin tools, API keys, SSO, SCIM, an OAuth 2.1 provider, MCP auth, Stripe and Polar billing, and more.
That structure is why I call it a micro framework. You start with a tiny surface, add exactly the pieces your product needs, and every piece runs in your process and writes to your tables.
Here is a complete Better Auth setup for a Next.js app with Postgres, GitHub sign-in, and organizations:
import { db } from "@/db"
import { drizzleAdapter } from "@better-auth/drizzle-adapter"
import { betterAuth } from "better-auth"
import { organization } from "better-auth/plugins"
export const auth = betterAuth({
database: drizzleAdapter(db, { provider: "pg" }),
emailAndPassword: { enabled: true },
socialProviders: {
github: {
clientId: process.env.GITHUB_CLIENT_ID!,
clientSecret: process.env.GITHUB_CLIENT_SECRET!,
},
},
plugins: [organization()],
})One route mounts every auth endpoint:
import { toNextJsHandler } from "better-auth/next-js"
import { auth } from "@/lib/auth"
export const { GET, POST } = toNextJsHandler(auth)And reading the session in a Server Component is one call:
import { headers } from "next/headers"
import { redirect } from "next/navigation"
import { auth } from "@/lib/auth"
export default async function DashboardPage() {
const session = await auth.api.getSession({ headers: await headers() })
if (!session) redirect("/sign-in")
return <h1>Welcome back, {session.user.name}</h1>
}The client side is a typed createAuthClient from better-auth/react. Add the organizationClient() plugin and calls like authClient.organization.create() are available with full types. The server and client plugins share types, so when you add a plugin on the server, its methods appear on the client too.
Run npx auth migrate (the standalone CLI introduced in Better Auth 1.5), or generate the schema for Drizzle or Prisma and run your own migrations. That is the whole setup.
How Clerk is different
Clerk is a hosted identity platform. Your users, sessions, and organizations live in Clerk's database. Your app talks to Clerk through its SDK, and Clerk gives you components such as <SignIn />, <UserButton />, and an organization switcher that look good out of the box.
That model is great on day one. The trade-offs show up on day ninety.
Your user table is somewhere else. Most SaaS data hangs off a user or an organization: projects, invoices, usage, plan limits. With Clerk, those rows live in your database but the user lives in Clerk's. The usual fix is to sync Clerk data to your app with webhooks, which means a webhook endpoint, retry handling, and two sources of truth that can drift.
With Better Auth, the user table is just a table. In Tkit.ai, a beforeCreateOrganization hook runs before a user creates a new workspace (Better Auth calls them organizations) and checks their plan. Free users can own one workspace. That check is a Drizzle query joining Better Auth's member table with my own billing tables, in the same D1 database. There is nothing to sync.
Custom logic goes through Clerk's extension points. Clerk has a lot of configuration, but your custom rules have to fit the places Clerk exposes. In Better Auth, the request pipeline is yours. In Tkit.ai, databaseHooks send a welcome notification after sign-up. A before hook keeps the email OTP plugin limited to verifying addresses, so its passwordless sign-in routes stay off. Rate limits are stored in Cloudflare's Workers Rate Limiting bindings, so counts are shared across isolates. It is all TypeScript in my codebase, versioned and tested with everything else.
Pricing grows with your users. Clerk's pricing page currently lists a free plan up to 50,000 monthly retained users, a Pro plan at $20 per month billed annually ($25 billed monthly), and $0.02 per additional retained user, with volume discounts at higher tiers. That is a generous free tier, and for many products it never matters. For a consumer-style product with a big free tier, it can become one of your larger bills. Better Auth costs nothing per user, because it is a library.
None of this makes Clerk bad. It makes Clerk a different kind of product. You are renting an identity system. With Better Auth, you own one.
How NextAuth (Auth.js) is different
NextAuth was the default for Next.js auth for years, and Auth.js was its framework-agnostic successor. The story changed in September 2025, when Auth.js became part of Better Auth. The Better Auth team now maintains it. Existing users still get security patches, but the recommendation for new projects is Better Auth. The main exception they name is stateless session management without a database.
The bigger difference is scope. Auth.js is mostly an OAuth and session layer. Email and password, two-factor auth, organizations, roles, invitations, and API keys were things you built yourself on top of it. In Better Auth, those are maintained plugins with database schemas, endpoints, and typed client methods.
If you have a working Auth.js app, there is no fire to put out. If you are starting a new Next.js SaaS in 2026, I would not start there.
What about Supabase Auth, Auth0, and WorkOS?
These sit closer to Clerk than to Better Auth. Supabase Auth is tied to Supabase, and it works well if your whole backend is already Supabase. Auth0 and WorkOS are hosted identity providers with strong enterprise features. WorkOS is especially good at SSO and directory sync for B2B.
They all share Clerk's core trade-off: the identity system lives outside your app. That is often a reasonable price for compliance paperwork, enterprise SSO, or a team that does not want to own auth. It is just not the trade I want for the products I build.
Better Auth vs Clerk vs NextAuth at a glance
| Better Auth | Clerk | NextAuth (Auth.js) | |
|---|---|---|---|
| What it is | Open-source auth framework | Hosted identity platform | Open-source auth library |
| Where users live | Your database | Clerk's database | Your database (with an adapter) |
| Cost | Free (MIT). Optional paid dashboard | Free to 50,000 retained users, then per user | Free (MIT) |
| Prebuilt UI | No. Bring your own or use community shadcn/ui blocks | Yes, polished components | Basic default pages |
| Organizations and roles | Plugin | Built in | Build it yourself |
| 2FA, passkeys, magic links | Plugins | Built in | Magic links built in, 2FA yourself |
| Enterprise SSO and SCIM | Plugins, plus a paid self-service dashboard | Built in, on paid plans | Build it yourself |
| Auth logic runs in your app | Yes | No, hosted by Clerk | Yes |
| Status for new projects | Actively developed | Actively developed | Maintenance mode, Better Auth recommended |
The things that sold me on Better Auth
It runs where my app runs
Most of what I ship runs on Cloudflare Workers with Hono, Drizzle, and D1. Better Auth added Cloudflare D1 support in 1.5, and since the whole thing is a library, auth runs in the same Worker as the API, against the same database. Sessions, users, and product data are one query apart.
The Next.js story is just as clean. In Next.js 16, middleware.ts became proxy.ts, and Better Auth's docs show both a full session check and a fast cookie-only check for the proxy. One warning from those docs: the cookie check only proves a cookie exists. It is fine for redirects, but always validate the session again in the page or route that reads the data.
Plugins cover the boring SaaS parts
A B2B SaaS needs workspaces, members, invitations, roles, and often API keys and billing. With Better Auth, those are plugins: organization() for workspaces and teams, admin() for internal tooling, twoFactor() and emailOTP() for account security, and the Stripe plugin for subscriptions. Since 1.5, the Stripe plugin can also sync seat-based billing with organization members, and API keys can belong to an organization instead of a single user.
Tkit.ai uses organization, admin, twoFactor, emailOTP, and lastLoginMethod, plus Google and GitHub sign-in. The last plugin is small: it records whether you last signed in with Google, GitHub, or email, so the sign-in page can point you back to the same method. It is a tiny detail, and I did not have to build it.
My app can be an OAuth server, too
This is the feature that made the decision permanent for me. Tkit.ai exposes an MCP endpoint so AI assistants like Claude Code can search a workspace's knowledge base. MCP clients expect an OAuth 2.1 authorization server with dynamic client registration and PKCE.
Better Auth ships that as @better-auth/oauth-provider. I configured the scopes, limited which redirect URIs assistants can register, made tokens valid only for the MCP endpoint, and stored them as hashes. The assistant sends the user to my normal sign-in page, and the user picks a workspace on my own consent screen. The tokens live in my database, and the MCP route checks them in the same Worker.
Building a spec-compliant OAuth server from scratch is not a weekend project. Here it was a plugin and some configuration.
Leaving is cheap
Because the data is in my database and the library is MIT licensed, I am never locked in. If Better Auth disappeared tomorrow, my users, accounts, and sessions would still be rows in tables I control.
What Better Auth costs you
Owning auth is not free. It just moves the cost from an invoice to your time.
- You build the UI. Sign-in, sign-up, password reset, account settings, and organization screens are yours. Community shadcn/ui blocks help, but it is still work Clerk does for you.
- You send the emails. Verification, OTP, and invitation emails go through your own provider. Deliverability is your problem.
- You own security posture. Rate limiting is built in, and there are plugins for captchas and for checking passwords against Have I Been Pwned, but you configure and monitor them. Clerk's bot protection and fraud detection are part of what you pay for.
- You keep it updated. Better Auth ships often. The changelog had several 1.7 releases in November 2026 alone. Read the action-required notes before you bump versions.
If you want some of the managed parts back, Better Auth sells optional infrastructure for self-hosted setups: a user dashboard, audit logs, security detection, and self-service SSO. At the time of writing it has a $0 Starter tier and a $20 per month Pro tier. The framework itself stays free.
What the Vercel acquisition means
On July 7, 2026, Vercel announced it was acquiring Better Auth. Vercel's post says the library stays free and open source under MIT, keeps its name, and keeps its open contribution model. The founder and core team joined Vercel to keep working on Better Auth and on agent identity.
My take: this makes Better Auth a safer bet, not a riskier one. The biggest risk with an open-source auth library is that the people maintaining it run out of money or time. That risk is lower now. Better Auth's own post says the team can focus on the library without shaping its strategy around monetization.
Better Auth still runs anywhere, not just on Vercel. Most of my Better Auth code runs on Cloudflare. If that ever changes, the MIT license and the fact that the data is in my database are the exit plan.
When I would still pick Clerk
I am not dogmatic about this. I would choose Clerk when:
- The product is a prototype or an internal tool, and I need sign-in working in an hour, not a day.
- Nobody on the team wants to own sign-in UI, email delivery, and auth security.
- The business sells to enterprises that want SSO on day one, and paying for a vendor that already has the compliance paperwork is cheaper than doing it myself.
- The user count will stay well under the free tier, or revenue per user easily covers Clerk's per-user price.
For everything else, especially multi-tenant SaaS products, apps on Cloudflare, and anything that needs to act as an OAuth server for AI agents, I use Better Auth.
If you are already on Clerk and want to move, Better Auth has an official Clerk migration guide.
The bottom line
Clerk sells you a finished identity system. Better Auth gives you the parts to build your own, and most of those parts are already written.
For a Next.js SaaS in 2026, I want my users in my own database, auth logic in my own codebase, and no per-user bill as the product grows. That is why every project I start uses Better Auth.
Frequently asked questions
Is Better Auth better than Clerk for a Next.js SaaS?
It depends on what you want to own. Better Auth is an open-source TypeScript library that runs inside your app and stores users in your own database, so it fits SaaS products that need custom auth logic, multi-tenant organizations, or auth on runtimes like Cloudflare Workers. Clerk is a hosted service with prebuilt UI, so it fits teams that want sign-in working in an afternoon and are happy to pay per retained user after 50,000.
Is Better Auth free?
Yes. The Better Auth framework is free and MIT licensed. Better Auth also sells optional managed infrastructure (a dashboard, audit logs, and security detection), with a $0 Starter tier and a $20 per month Pro tier at the time of writing. You do not need it to run Better Auth in production.
How much does Clerk cost in 2026?
Clerk's pricing page lists a free plan for up to 50,000 monthly retained users. The Pro plan is $20 per month billed annually or $25 billed monthly, and additional retained users start at $0.02 each with volume discounts. Check clerk.com/pricing before you commit, because these numbers change.
Should I use NextAuth (Auth.js) or Better Auth for a new Next.js project?
Better Auth. Since September 2025, Auth.js has been maintained by the Better Auth team, who keep shipping security fixes for existing users but recommend Better Auth for new projects. The main exception they list is stateless session management without a database.
Did Vercel acquire Better Auth?
Yes. Vercel announced the acquisition on July 7, 2026. Vercel said the library stays free and open source under the MIT license, keeps its name, and keeps its open contribution model. The core team joined Vercel to keep working on Better Auth and agent identity.
Can I migrate from Clerk to Better Auth?
Yes. Better Auth publishes an official Clerk migration guide. Because Better Auth stores users in your own database, the migration is mainly moving user, account, and session data out of Clerk and into Better Auth's tables, then swapping Clerk's components for your own UI.