Antonio Ranivoarison
Antonio
← All posts

Authentication library for 2026

NextAuth, Clerk, Better-Auth — I tried them all. Here's what actually happened.

#auth

April 9, 2026


Authentication is one of those things every app needs, and somehow it's still painful in 2026. I went through three different solutions before landing on something I actually like. Here's the honest story.

The starting point — Auth.js (next-auth)

Auth.js is the default recommendation you'll find everywhere. It's been around forever, it has a massive community, and it integrates with Next.js natively.

So naturally, I tried it first.

Two days. Two full days of setup — and nothing was working yet.

To be fair, it was in beta. And not for a week or a month — three years in beta. That's not a beta, that's a product that can't decide what it wants to be.

The configuration is verbose, the error messages are cryptic, and every Stack Overflow answer references a version that no longer exists. I moved on.

The easy way out — Clerk

After the Auth.js experience, I just wanted something that worked. A YouTube tutorial led me to Clerk, and I was sold in about fifteen minutes.

Clerk takes ~15 minutes to set up a fully working auth flow. Sign in, sign up, OAuth, session management — all of it.

It's pre-built, polished, and the DX is genuinely impressive. If you're building a side project and auth is not the point — Clerk is the right call.

But once I wanted to customize things, I hit a wall. The components are opinionated by design. You can style them to a point, but you can't really own them. And for anything outside the happy path, you're fighting the abstraction.

It's a tool for people who want to move fast and don't need control. Nothing wrong with that — just not always what I need.

The one I actually use now — Better-Auth

I found Better-Auth through a YouTube video, and it immediately felt different.

1

Install and configure

Standard setup — less than 30 lines to get a working auth config with your database adapter.

2

Add email/password + social login

Both running in under an hour. The API is consistent and the docs are actually readable.

3

Add plugins as you need them

Two-factor auth, organizations, admin, entreprise SSO — all available as opt-in plugins. You add what you need, nothing more.

Better-Auth gives you the speed of Clerk with the control of rolling your own. That combination is rare.

It's not perfect — the ecosystem is younger and you'll find fewer tutorials. But for any project where I care about owning the auth layer, it's my default now.

What about Supabase Auth and Firebase Auth ?

Both are valid — but they come with a trade-off: you're buying into a platform, not just an auth library.

Supabase Auth is tightly coupled with the Supabase ecosystem. If you're already using Supabase for your database, it's a natural fit. But if you're on Neon or PlanetScale, you're adding an entire BaaS just for auth.

Firebase Auth is the same story on the Google side. It works well within Firebase projects, but mixing it with a Next.js + Prisma stack adds unnecessary complexity. You end up managing two data layers that don't naturally talk to each other.

Both are great tools. They're just not auth libraries — they're platforms that include auth. If auth is all you need, don't pull in a full platform for it.

The summary

LibrarySetupFlexibilityControlBest for
Auth.jsIf you enjoy pain
ClerkFast side projects
Better-AuthEverything else
Supabase AuthAlready on Supabase
Firebase AuthAlready on Firebase

My default in 2026: Better-Auth for full projects, Clerk when I need to ship something in a weekend.

© Copyright 2026 - Antonio

All Right Reserved