Skip to content
OpenSourceSoftware.ai
Better Auth logo

Better Auth

better-auth · Authentication libraries

What is Better Auth?

Better Auth is a code library that adds sign-in and user accounts to TypeScript apps. It is not an app you run on its own: it lives in your codebase and works with most popular frameworks. The framework is free under the MIT licence, and since September 2025 its team has also maintained Auth.js.

Better Auth is an authentication and authorization framework for TypeScript that lives in your own codebase. It handles email and password, social sign-on, sessions, two-factor sign-in and organizations, and plugins add features such as passkeys and SSO.

Core capabilities

  • Email and password, social sign-on and account and session management built in.
  • Plugins add passkeys, multi-tenancy, multi-session support and SSO.
  • Works with most popular frameworks and handles its own database migrations.

What is built in

Email and password sign-in, social sign-on, account and session management, a rate limiter and automatic database migrations come out of the box. Two-factor sign-in is included, and organizations with access control are there for products sold to teams.

  • Email and password
  • Social sign-on
  • Two-factor

Plugins

A plugin ecosystem adds more, including passkeys, multi-tenancy, multi-session support and SSO. The docs say it can even be used to create your own identity provider.

  • Plugins
  • Passkeys
  • SSO

Free framework, paid infrastructure

The framework is MIT-licensed and free. Better Auth Inc also sells optional managed infrastructure that connects to a self-hosted install and adds a dashboard, audit logs and security detection. There is a free Starter plan, a Pro plan at $20 a month and custom Enterprise pricing.

  • MIT
  • Self-host
  • Managed add-on

Where it fits

Use cases

  1. 01

    Add sign-in to a TypeScript app

    Install the framework in your codebase and turn on email and password or social sign-on. The sign-in code stays in your own app rather than with a hosted provider.

  2. 02

    Sell to teams and companies

    Use the organization and access control features for team accounts, then add SSO when enterprise customers ask for it.

  3. 03

    Move off Auth.js or Clerk

    Auth.js is now part of Better Auth, and the team recommends Better Auth for new projects. Its site has migration guides for moving from NextAuth and from Clerk.