Skip to content

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
Step-by-step guide: how to use Better AuthInstall, first run, examples, tips and FAQs

How to get it

  1. 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. 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. 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

ProjectStarsTypeLevelUpdatedBest for
better-auth (this)30.6kLibraryintermediate5 days agoTypeScript developers who need login and access control in their own app
oauth2-proxy15.3kOtherintermediate4 days agoTeams protecting internal web apps that have no login system of their own
passport23.5kLibraryintermediate2.2 years agoNode.js and Express developers who need to add login to an existing app
django-allauth10.4kLibraryintermediate6 days agoDjango developers who need signup and login for a web project
devise24.4kLibraryintermediate1 months agoRails developers who need standard email-and-password login quickly
jwt-auth11.5kLibraryintermediate12 days agoLaravel 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.