Skip to content
Agents tracked: 378 Downloads (7d): 244M down 5.7% GitHub stars: 8.4M VS Code installs: 151M Releases (7d): 407 Agent status: 1 with issues Updated Oct 10, 2026

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

Zod81.0% of Better Auth projects · 4.8× more than average
Lucide React80.2% of Better Auth projects · 4.0× more than average
Tailwind Merge77.0% of Better Auth projects · 4.6× more than average
clsx76.2% of Better Auth projects · 4.3× more than average
Class Variance Authority73.8% of Better Auth projects · 5.2× more than average
tw-animate-css68.3% of Better Auth projects · 10.2× more than average
Sonner58.7% of Better Auth projects · 7.3× more than average
Tailwind CSS88.9% of Better Auth projects · 2.6× more than average

By coding agent

GitHub Copilot1.9% of projects set up for it
Claude Code1.6% of projects set up for it
Cursor1.9% of projects set up for it
OpenCode4.4% of projects set up for it
OpenAI Codex2.0% of projects set up for it
Gemini CLI1.6% of projects set up for it
Devin Desktop1.8% of projects set up for it

Share of public repos configured for each agent that list Better Auth as a dependency.

Install

Packagenpm install better-auth
Main stacksNext.js (84), TypeScript / JavaScript (42)
Example projectskovrichard/catalyst, inboundemail/inbound, n00ki/sveltekit-omakase, vinhnx/vtchat, iflabx/agentifui

Alternatives to Better Auth

All auth and security libraries

Tool Used in agent projectsDownloads / wk GitHub starsLicense
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
Is Better Auth right for your project? Ask AgentGid →