
Better Auth
A TypeScript authentication and authorization framework with built-in features and plugins.
- Stars
- 30.6k
- Forks
- 3.1k
- Licence
- MIT
- Language
- TypeScript
- Last update
- 5 days ago
- Type
- Library
What it is
Better Auth is a TypeScript framework for handling user authentication and authorization in your app, and it is not tied to one web framework. It ships with a set of common features and a plugin system for adding more advanced ones, such as two-factor authentication and multi-tenant support, with relatively little code. The README is brief, so specifics beyond these points are not covered here.
- Add email and password or social sign-in to a TypeScript web app
- Add two-factor authentication through a plugin
- Support multiple tenants or organizations in one application
Great for
- TypeScript developers who need login and access control in their own app
- Teams that want auth built into their code rather than handed to a third-party service
- Projects that may later need extras like 2FA or multi-tenant support via plugins
Not ideal for
- Non-developers looking for a ready-made login page with no coding (it is a code library)
- Projects not using TypeScript or JavaScript, since the framework is written for that ecosystem
- Teams that want a fully managed hosted auth service with no code to maintain
How to get it
- 1
Install with a package manager
You'll need: Node.js (version not specified in the README)
Install the npm package
npm install better-auth - 2
Run it
- Install the package in your TypeScript project
- Follow the setup guide at https://better-auth.com
- Configure the auth features you need in your app
- 3
Get the most out of it
- Use the plugin ecosystem to add features like 2FA or multi-tenant support instead of writing them yourself
- Read the documentation at better-auth.com for configuration details not covered in the README
Downloads
Strengths
- Free and open source under the MIT License, so it can be used and modified freely
- Framework-agnostic, so it is not limited to one web framework according to the README
- Plugin ecosystem aims to add advanced features with minimal code
Trade-offs
- The README is short and does not document specific features or setup steps, so details must come from the official website
- Being a code library, it requires a developer to integrate and maintain it
- Security issues are handled through GitHub Security Advisories, so reporting depends on that process
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| better-auth (this) | 30.6k | Library | intermediate | 5 days ago | TypeScript developers who need login and access control in their own app |
| oauth2-proxy | 15.3k | Other | intermediate | 4 days ago | Teams protecting internal web apps that have no login system of their own |
| passport | 23.5k | Library | intermediate | 2.2 years ago | Node.js and Express developers who need to add login to an existing app |
| django-allauth | 10.4k | Library | intermediate | 6 days ago | Django developers who need signup and login for a web project |
| devise | 24.4k | Library | intermediate | 1 months ago | Rails developers who need standard email-and-password login quickly |
| jwt-auth | 11.5k | Library | intermediate | 12 days ago | Laravel developers building token-based APIs |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.