Tools / Better Auth

Better Auth

The open-source TypeScript auth framework.

Screenshot of Better Auth website
better-auth.com, homepage
Better Auth is an open-source authentication framework for TypeScript apps. Auth is defined in code through a `betterAuth()` config — email and password settings, social providers, and plugins — so it…From the listing

About Better Auth

Better Auth is an open-source authentication framework for TypeScript apps. Auth is defined in code through a `betterAuth()` config — email and password settings, social providers, and plugins — so it stays version-controlled, type-safe, and reviewable in pull requests rather than managed through a dashboard. Credential auth with sessions, email verification, and password reset is built in, and a plugin system covers everything from passkeys and two-factor to organizations and enterprise SSO.

What it does

Better Auth handles authentication inside your application. You install it, run npx auth init, and configure it in a single auth.ts file:

import { betterAuth } from "better-auth"

export const auth = betterAuth({
  emailAndPassword: { enabled: true },
  socialProviders: {
    google: { clientId: process.env.GOOGLE_CLIENT_ID!, ... },
    github: { clientId: process.env.GITHUB_CLIENT_ID!, ... },
  },
  plugins: [twoFactor(), passkey(), organization()],
})

It supports Next.js, Nuxt, SvelteKit, Astro, Hono, and 20+ other frameworks, and works with your own database.

Features

  • Email & password — sessions, email verification, and password reset included
  • Social sign-on — Google, GitHub, Apple, Discord, and more
  • 50+ plugins — passkeys, magic links, email OTP, phone number, username, one-tap, anonymous, bearer, one-time token, SIWE, JWT, API keys, multi-session
  • Organizations — teams, roles, invitations, access control, org admin, multi-session, and org API keys for multi-tenancy
  • Enterprise — SSO, SAML 2.0, SCIM, directory sync, and OAuth proxy
  • Auth for AI agents — MCP auth, token exchange, and agent delegation
  • Security — bot detection, IP blocking, email validation, HIBP breached-password checks, and captcha
  • Integrations — Stripe, Polar, Dub, Autumn, Dodo Payments, Creem, and OpenAPI

Optional hosted infrastructure

The framework is self-hostable, and Better Auth sells connected infrastructure at dash.better-auth.com that adds:

  • Dashboard — user management, session monitoring, organization oversight, user analytics
  • Audit logs — auto-captured events, filtering and search, configurable retention, log drain to SIEM
  • Enterprise — self-service SSO, SCIM provisioning, directory sync, RBAC
  • Sentinel — real-time threat detection covering brute force, breached passwords, impossible travel, rate limiting, geo blocking, suspicious IPs, disposable emails, and free-trial abuse

Pricing for these plans is on the site's pricing page; specific prices aren't listed on the homepage.

Project

The project is developed on GitHub (github.com/better-auth) with 975+ contributors. The homepage lists OpenAI, Databricks, and Strapi under "Trusted By," and a current announcement states that Better Auth is joining Vercel. Documentation lives at better-auth.com/docs.

Alternatives

  • Clerk — drop-in auth and user management for modern apps
  • Auth0 — identity platform for authentication and authorization
  • WorkOS — enterprise auth: SSO, SCIM, and audit logs
  • Stytch — auth APIs for passwordless and B2B SaaS
  • Supabase — Postgres plus auth, storage, and realtime
  • Firebase — Google's app development platform with auth included

FAQ

Is Better Auth free? The framework is open source and self-hostable. The hosted infrastructure (dashboard, audit logs, enterprise features) is a paid offering — the site has a plans page but doesn't show prices on the homepage.

Which frameworks does it support? Next.js, Nuxt, SvelteKit, Astro, Hono, and 20+ more, according to the docs.

Does it support enterprise SSO? Yes. SSO, SAML 2.0, SCIM, directory sync, and OAuth proxy are listed as enterprise plugins.

Can I self-host it? Yes. The site describes connecting its hosted dashboard and infrastructure to a self-hosted Better Auth instance.

What databases does it work with? The homepage mentions "Bring Your Own Database" as a core capability; the specific supported databases are detailed in the docs.

Who maintains it? A community of 975+ contributors, with the project joining Vercel per the site's announcement.

Share:

Ad
Favicon

 

  
 

Similar to Better Auth

Favicon

 

 
Favicon

 

 
Favicon

 

 

New tools, once a week.

One weekly email with curated tools and founder insights. Unsubscribe anytime. Check our privacy policy.

Weekly emailCurated tools