BETTER-AUTH.

Introducing | Agent Auth Protocol

The most comprehensive authentication framework

README

Auth that lives inside your app. Composable, plugin-based, and built to scale — powering from weekend projects to the biggest consumer and enterprise apps on the planet.

npx auth init
Trusted By
OpenAI
databricks
strapi
OpenAI
databricks
strapi
Features
Framework

The most comprehensive authentication framework for TypeScript.

auth.ts
import { betterAuth } from "better-auth"export const auth = betterAuth({  emailAndPassword: {    enabled: true,  },  socialProviders: {    google: {      clientId: process.env.GOOGLE_CLIENT_ID!,      clientSecret: process.env.GOOGLE_CLIENT_SECRET!,    },    github: {      clientId: process.env.GITHUB_CLIENT_ID!,      clientSecret: process.env.GITHUB_CLIENT_SECRET!,    },  },  plugins: [    twoFactor(),    passkey(),    organization(),  ],})
Plugin Ecosystembrowse all →
Two FactorAuthenticationPasskeyAuthenticationMagic LinkAuthenticationEmail OTPAuthenticationUsernameAuthenticationOne TapAuthenticationPhone NumberAuthenticationAnonymousAuthenticationBearerAuthenticationGeneric OAuthAuthenticationOne Time TokenAuthenticationSIWEAuthenticationOrganizationOrganizationAdminOrganizationMulti SessionOrganizationAPI KeyOrganizationSSOEnterpriseTwo FactorAuthenticationPasskeyAuthenticationMagic LinkAuthenticationEmail OTPAuthenticationUsernameAuthenticationOne TapAuthenticationPhone NumberAuthenticationAnonymousAuthenticationBearerAuthenticationGeneric OAuthAuthenticationOne Time TokenAuthenticationSIWEAuthenticationOrganizationOrganizationAdminOrganizationMulti SessionOrganizationAPI KeyOrganizationSSOEnterprise
OIDC ProviderEnterpriseSCIMEnterpriseOAuth ProxyEnterpriseJWTSecurityHIBPSecurityCaptchaSecurityStripeIntegrationPolarIntegrationOpen APIIntegrationDubIntegrationAutumnIntegrationDodo PaymentsIntegrationCreemIntegrationMCPAIDevice AuthAuthenticationLast LoginAuthenticationOIDC ProviderEnterpriseSCIMEnterpriseOAuth ProxyEnterpriseJWTSecurityHIBPSecurityCaptchaSecurityStripeIntegrationPolarIntegrationOpen APIIntegrationDubIntegrationAutumnIntegrationDodo PaymentsIntegrationCreemIntegrationMCPAIDevice AuthAuthenticationLast LoginAuthentication
Infrastructure

Connect to our infrastructure and power your self-hosted Better Auth with a dashboard, audit logs, security detection, enterprise features, and more.

dash.better-auth.com
OverviewUsersOrgsEvents

Dashboard

  • +User management
  • +Session monitoring
  • +Organization oversight
  • +User analytics

Audit Logs

  • +Auto-captured events
  • +Filter & search
  • +Configurable retention
  • +Log drain to SIEM

Enterprise

  • +Self-service SSO
  • +SCIM provisioning
  • +Directory sync
  • +RBAC

Sentinel

Real-time threat detection before it reaches your users.

Bot DetectionBrute ForceBreached PasswordsImpossible TravelRate LimitingGeo BlockingSuspicious IPsDisposable EmailsEmail AbuseFree Trial Abuse
Explore plansDashboard, audit logs, security detection, transactional comms, and more.
View Plans
Contributors

Built by a community of 827+ contributors.

Roll your own auth with confidence in minutes.