# better-auth/better-auth

The most comprehensive authentication framework

Repository: https://github.com/better-auth/better-auth
Canonical: https://ross.abutalabs.com/products/better-auth
Homepage: https://better-auth.com
Language: TypeScript
License: MIT
License Family: permissive
Topics: authentication, oauth, oauth2, typescript, iam, oidc, sso, stripe
Last push: 2026-08-26T19:58:09+00:00

## Health v2 (maintenance only)
Score: 87/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 87, longevity 59
- inputs: {"age_days": 836, "days_push": 7, "days_rel": 7, "gap_med": 1, "n_releases_24m": 210}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 29706, forks 2845 (observed 2026-08-28T04:11:53.634567+00:00)

## What it is
Better Auth is a framework-agnostic authentication and authorization framework for TypeScript that ships with comprehensive features like email/password, social sign-on, 2FA, passkeys, organizations, and enterprise SSO out of the box. It is extended through a plugin ecosystem of 50+ plugins and works with Next.js, Nuxt, SvelteKit, Hono, and many other frameworks.

## Use cases
- add email and password authentication to a TypeScript web app
- implement social login with Google, GitHub, or Apple
- set up two-factor authentication and passkeys
- manage organizations, teams, roles, and access control
- add SAML SSO and SCIM directory sync for enterprise customers
- issue API keys and JWTs for service authentication
- authenticate AI agents with MCP and token exchange
- manage Stripe subscriptions alongside user accounts

## When to choose
- you want self-hosted auth that lives in your codebase instead of a third-party service
- you need a wide range of auth features (2FA, passkeys, SSO, multi-tenancy) from one library
- your stack is TypeScript and you use a popular framework like Next.js or SvelteKit
- you need OAuth/OIDC provider capabilities or MCP auth for AI agents

## When to avoid
- you need a fully managed hosted auth service with zero infrastructure
- your project is not in the TypeScript/JavaScript ecosystem
- you only need a tiny, minimal auth solution and prefer assembling it yourself

## Facets
- artifact type: framework
- maturity: active
- function: auth, authorization, middleware, rate-limiting, api-framework
- domain: web-development, backend, security, developer-tools
- platform: cross-platform
- tags: oauth2, oidc, sso, saml, passkeys, two-factor-authentication, multi-tenancy, session-management, social-login, plugin-ecosystem, stripe, mcp-auth, framework-agnostic, nodejs, typescript, web-server

## Member repositories
- better-auth/better-auth (main) score 87

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:53.634567+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:52:53.952970+00:00, confidence not recorded.
  - readme: https://github.com/better-auth/better-auth (fetched 2026-08-28T04:11:53.634567+00:00, sha f66803e0697a)
  - homepage: https://better-auth.com (fetched 2026-08-29T07:50:22.961840+00:00, sha 3a347219ff8a)
  - site_page: https://better-auth.com/docs (fetched 2026-08-29T07:50:22.964649+00:00, sha 5c1741a8d780)
  - site_page: https://better-auth.com/docs/installation (fetched 2026-08-29T07:50:22.966461+00:00, sha 0bf371604517)
  - site_page: https://better-auth.com/docs/plugins (fetched 2026-08-29T07:50:22.973067+00:00, sha 3653da2ebada)
  - site_page: https://better-auth.com/changelog (fetched 2026-08-29T07:50:22.968271+00:00, sha 2b147e399b83)
  - site_page: https://better-auth.com/pricing (fetched 2026-08-29T07:50:22.971478+00:00, sha aa0c3c2f15ef)
- Data as of 2026-08-30T08:39:29.467469+00:00.
