better-auth README

The project's README from github.com/better-auth/better-auth. As one markdown file: README.md.

Better Auth Logo

npm npm version GitHub stars

Discord · Website · Issues

Better Auth

Better Auth is a framework-agnostic authentication (and authorization) framework for TypeScript. It provides a comprehensive set of features out of the box and includes a plugin ecosystem that simplifies adding advanced functionalities with minimal code in a short amount of time. Whether you need 2FA, multi-tenant support, or other complex features, it lets you focus on building your actual application instead of reinventing the wheel.

Why Better Auth

Authentication in the TypeScript ecosystem is a half-solved problem. Other open-source libraries often require a lot of additional code for anything beyond basic authentication. Rather than just pushing third-party services as the solution, I believe we can do better as a community—hence, Better Auth.

Contribution

Better Auth is a free and open source project licensed under the MIT License. You are free to do whatever you want with it.

You could help continuing its development by:

Security

If you discover a security vulnerability within Better Auth, please report it via GitHub Security Advisories.

All reports will be promptly addressed, and you'll be credited accordingly.

better-auth (better-auth/better-auth)

Searching Database…

What is this?It's Better Auth — a free, open-source authentication and authorization framework for TypeScript with a plugin ecosystem for advanced features.
Is this a hosted service I sign up for, or code I add to my own app?Code you run yourself: it lives inside your own TypeScript app instead of outsourcing logins to a third-party service — that contrast is the author's core pitch.
How do I add it to my project?Install the npm package (npm install better-auth — works with npm, pnpm, or yarn) and follow the installation guide in the docs; after that it's an ordinary dependency in your codebase.
Do I need particular accounts, keys, or a specific framework for it?None beyond a TypeScript project — there are no required accounts or API keys, because authentication runs inside your own application.
What does it cover out of the box, and when do I need plugins?A comprehensive set of auth features works out of the box, while complex needs like 2FA and multi-tenant support are handled by its plugin ecosystem with minimal code.
Is it really free, including commercial use?Yes — MIT licensed: the project calls itself free and open source and says you are free to do whatever you want with it.
Why did the author build this instead of using an existing library or service?He considers authentication in the TypeScript ecosystem a half-solved problem: open-source libraries demand lots of extra code beyond basic auth, and he wanted a community-owned alternative to pushing everyone toward third-party services.
Will it work with my stack, or is it tied to one framework?It's framework-agnostic, so it isn't built around a single meta-framework — any TypeScript codebase can adopt it. The repo itself is developed as a pnpm and Turborepo monorepo, which matters mainly if you want to contribute.
What are similar projects?casdoor, django-allauth, authentik, casbin, zitadel, logto, kratos, hydra
Size
160.8 MB
Stars
30.3K
Age
2y
Commits · 90 Days