Better Auth vs Lucia

Pricing

Better Auth: Free and open source (MIT); optional managed dashboard from $20/mo

Lucia: Free and open source, deprecated since March 2025

Description

Better Auth: Open-source TypeScript authentication framework that runs inside your app and stores users in your own database

Lucia: Open-source TypeScript session library, deprecated in March 2025 and replaced by a single-file code example you copy into your app

Pros

  • Free under the MIT licence; you pay only if you want the optional managed dashboard
  • Works across frameworks and lets you bring your own database
  • Plugins add OAuth providers and security features such as rate limiting, bot detection and breached-password checks
  • The replacement is plain code: one session file you own, with no package to update
  • Free, no MAU limits, and your auth data stays in your own database
  • The author's Auth Book explains sessions, passwords and OAuth in depth

Cons

  • Built for TypeScript projects only
  • It runs inside your own app, so updates and security patches are your job, unlike hosted services such as Clerk or Auth0
  • The free Starter dashboard keeps audit logs for one day and caps them at 10,000 a month
  • The npm package is deprecated: no fixes or security updates
  • You build everything yourself: no pre-built login UI, no hosted dashboard
  • Requires solid understanding of sessions, cookies, and auth security

Details

Better Auth is a library, not a hosted service. You install it in your TypeScript app, point it at your own database, and it handles sign-in and OAuth providers, with plugins for the extras. Your users stay in your database, and the framework itself costs nothing.

It suits developer founders who want to own their auth without writing it from scratch. The team also took over Auth.js (formerly NextAuth.js), and Better Auth’s site announces that it is joining Vercel.

The paid part is an optional managed dashboard with audit logs, security detections, transactional email and SMS, and single sign-on. Starter is free with one seat; Pro is $20/month plus usage.

Lucia was auth stripped down to its essentials: a TypeScript library for session management, with helpers for password hashing, OAuth and token generation. There was no hosted service and no per-user pricing, just code running in your app and storing sessions in your own database.

The author deprecated the npm package in March 2025. The Lucia site and repository now offer a complete single-file session implementation to copy into your project instead, along with the Auth Book as a guide to building auth yourself. That route still suits developers who want full control, but it means owning the security of that code. For auth done in an afternoon, Clerk or Firebase Auth handle it as a managed service, and SuperTokens is an open-source option you can self-host.

Verified

Other comparisons

All in Authentication