Comprehensive open-source authentication framework for TypeScript supporting everything from simple auth to enterprise SSO.
Better Auth is a code-first authentication framework for TypeScript that lives directly in your app, is version-controlled, and requires no dashboard clicks. It supports 50+ auth methods including passkeys, magic links, API keys, and JWTs; social sign-on with Google, GitHub, Apple, and Discord; multi-tenancy with teams, roles, and access control; enterprise SSO, SAML 2.0, SCIM, and directory sync; and MCP auth and token exchange for AI agents. Compatible with Next.js, Nuxt, SvelteKit, Astro, Hono, and 20+ other TypeScript stacks. Better Auth is a product of Better Auth.
For people
For agents