Better Auth: authentication that lives inside your TypeScript app

Add sessions, sign-in and organisation membership to your own TypeScript application. Better Auth offers reusable identity features without requiring a separate identity service.

What it is

Authentication starts innocently enough with a sign-in form. Then come password resets, invitations, multiple organisations and the occasional lost device.

Better Auth packages those recurring identity jobs into a TypeScript framework that runs within your application. Connect it to your database and mount its server handler in your web framework.

Plugins extend the core with organisation membership, passkeys and multi-factor authentication. You can start with a modest sign-in flow and introduce additional capabilities as your product needs them.

What’s new

Better Auth’s 1.7.28 release on 24 November 2026 is the version examined in our research. The 1.7 series expands enterprise identity provisioning and requires careful schema migration for existing SCIM installations.

The upstream 1.7.29 changelog also records fixes for one-time verification codes and for preventing session tokens from appearing in logs when secondary storage fails. These are worth checking before upgrading an identity system; confirm package availability for your chosen version.

What else is similar to it

Auth.js is another application-level authentication option, especially familiar to developers working with Next.js.

Keycloak and Logto take the separate identity-service route. That can make sense if several products need to share a login authority.

Why it’s different

Better Auth’s MIT core lets you keep identity within your product and select the plugins you need. You operate the database and decide how the application protects its resources.

On Cloudflare D1: our research found that ordinary sign-in and sessions have different compatibility boundaries from SCIM provisioning, which requires native transactions unavailable in the inspected adapter. Even with the organisations plugin, your API must still check access to the individual tenant’s resources.

How to get started

  1. Choose a database adapter, a supported server framework and a strong authentication secret.
  2. Follow the installation guide.
  1. Install better-auth and create the server auth configuration with your database connection.
  2. Mount its authentication handler and generate or apply the database schema using the documented CLI for your adapter.
  3. Create a client, enable email/password sign-in and test registration, sign-in and sign-out.
  1. Test account recovery, session revocation and unauthorised resource access.
  2. If adding organisation support, verify tenant membership on protected server operations.

Explore further: Documentation · Releases · GitHub.

Share your thoughts…?

    Get Geekist in your inbox

      Choose your newsletters. Confirm your email to subscribe.

      Choose your newsletters

      Read the privacy policy