Skip to content
Agents tracked: 502 Releases (7d): 613 Agent status: 4 with issuesSince last limit reset: Claude 7d · Codex 5d For AI agents: Markdown Updated Nov 18, 2026

NextAuth.js vs Better Auth

In 4,864 JavaScript/TypeScript projects set up for AI coding agents, NextAuth.js is a dependency in 151 (3.1%) and Better Auth in 104 (2.1%): NextAuth.js is 1.5× as common. Among repos created in the last 90 days that use a auth and security libraries tool, NextAuth.js is in 8.6% and Better Auth in 20.0%, against 17.2% and 11.3% of older ones. 3 projects list both, often a sign of a migration or of a monorepo with several apps.

Auth and security libraries npm Updated Nov 17, 2026

NextAuth.js3.1%
Better Auth2.1%

Share of 4,864 JavaScript/TypeScript projects set up for AI coding agents that list each one as a dependency.

Side by side

NextAuth.jsBetter Auth
Agent projects that use it151104
Rank in auth and security libraries#2#7
In new repos with a auth and security libraries tool (last 90 days)8.6%20.0%
In older repos with one17.2%11.3%
Downloads, last 7 days9.4M20M
GitHub stars28.4K30.8K
Last push to its repoJul 22, 2026Nov 17, 2026
LicenseISCMIT
FundingYes—
Projects that list both3

Downloads include CI runs and installs as a dependency of other packages. Stars and pushes are from GitHub's API; downloads from npm.

By coding agent

Projects set up forJavaScript/TypeScript reposNextAuth.jsBetter Auth
Claude Code2,6172.7%2.1%
GitHub Copilot2,3503.7%2.4%
Cursor1,9903.1%2.3%
Gemini CLI4222.4%1.7%
OpenAI Codex4092.7%2.0%
OpenCode3042.0%5.3%
OpenClaw2412.1%0%
Devin Desktop2313.5%2.2%

Share of the JavaScript/TypeScript repos configured for each agent (its config file in the repo) that list the tool. A repo set up for two agents counts for both.

NextAuth.js

Complete open-source authentication solution designed for Next.js applications.

Most often used with it:

Next.js99.3% of its projects
Lucide React83.4% of its projects
clsx82.1% of its projects
Tailwind Merge78.8% of its projects
React99.3% of its projects

npm install next-auth

Better Auth

Comprehensive authentication framework for TypeScript with multiple strategies.

Most often used with it:

Tailwind Merge77.9% of its projects
clsx76.9% of its projects
Lucide React77.9% of its projects
Class Variance Authority72.1% of its projects
tw-animate-css68.3% of its projects

npm install better-auth

More matchups

Better Auth vs ClerkNextAuth.js vs Clerkjsonwebtoken vs josebcryptjs vs bcrypt (JavaScript)PyJWT vs python-josepasslib vs bcrypt (Python)

How we count

Projects are public GitHub repos our weekly scan finds through coding-agent config files (CLAUDE.md, AGENTS.md, .cursor/mcp.json and others); a project uses a tool when its package.json, requirements.txt or pyproject.toml lists it. "Same job" was checked for every pair, so add-ons and companions are never paired. Shares by repo age compare repos created in the last 90 days with older ones in the same scan. More on the method.