Better Auth
Comprehensive authentication framework for TypeScript with multiple strategies.
Auth and security libraries npm MIT
Used in agent projects
126
1.0% of 12,697 public repos built with AI coding agents
Rank in auth and security libraries
#7 of 47
by use in those projects
Downloads
11.4M
npm, last 7 days, better-auth
GitHub stars
30.2K
last push Oct 10, 2026
How Better Auth is used
Better Auth is a dependency in 126 of the 12,697 public GitHub projects set up for AI coding agents that we scanned (1.0%), #7 of 47 in auth and security libraries. The most used alternative there is NextAuth.js. Projects that use it most often also use Zod (81.0%), Lucide React (80.2%), Tailwind Merge (77.0%).
Often used with Better Auth
| Zod | 81.0% of Better Auth projects · 4.8× more than average |
|---|---|
| Lucide React | 80.2% of Better Auth projects · 4.0× more than average |
| Tailwind Merge | 77.0% of Better Auth projects · 4.6× more than average |
| clsx | 76.2% of Better Auth projects · 4.3× more than average |
| Class Variance Authority | 73.8% of Better Auth projects · 5.2× more than average |
| tw-animate-css | 68.3% of Better Auth projects · 10.2× more than average |
| Sonner | 58.7% of Better Auth projects · 7.3× more than average |
| Tailwind CSS | 88.9% of Better Auth projects · 2.6× more than average |
By coding agent
| GitHub Copilot | 1.9% of projects set up for it |
|---|---|
| Claude Code | 1.6% of projects set up for it |
| Cursor | 1.9% of projects set up for it |
| OpenCode | 4.4% of projects set up for it |
| OpenAI Codex | 2.0% of projects set up for it |
| Gemini CLI | 1.6% of projects set up for it |
| Devin Desktop | 1.8% of projects set up for it |
Share of public repos configured for each agent that list Better Auth as a dependency.
Install
| Package | npm install better-auth |
|---|---|
| Main stacks | Next.js (84), TypeScript / JavaScript (42) |
| Example projects | kovrichard/catalyst, inboundemail/inbound, n00ki/sveltekit-omakase, vinhnx/vtchat, iflabx/agentifui |
Alternatives to Better Auth
| Tool | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|
| NextAuth.js npm Complete open-source authentication solution designed for Next.js applications. |
266 (2.1%) | 6.7M | 28.4K | ISC |
| bcryptjs npm Pure JavaScript bcrypt implementation for secure password hashing without dependencies. |
256 (2.0%) | 14.7M | 3,797 | BSD-3-Clause |
| jsonwebtoken npm Create, verify and decode JSON Web Tokens for authentication and secure data transmission. |
241 (1.9%) | 59.3M | 18.2K | MIT |
| cryptography pypi Python library providing cryptographic recipes and primitives for secure applications. |
213 (1.7%) | 281M | 7,803 | — |
| jose npm Comprehensive JWT and JWK handling for Node.js and web runtimes. |
141 (1.1%) | 151M | 7,824 | MIT |
| PyJWT pypi Python library for encoding and decoding JSON Web Tokens. |
128 (1.0%) | 154M | 5,714 | — |
| Helmet npm Express middleware that sets HTTP security headers to prevent vulnerabilities. |
125 (1.0%) | 16.2M | 10.7K | MIT |
| Privy Auth npm React authentication SDK enabling Web2 and Web3 logins with embedded wallets. |
107 (0.8%) | 430K | — | Apache-2.0 |