Authentication
Competitive109 extractable responses · Winner: Custom/DIY at 47.7%
Next.js: NextAuth.js (91%). Python: Custom/DIY (100%). SPA: fragmented. The winner depends entirely on your stack.
Overall Breakdown
n=109 extractable responses.
Custom/DIY52/109 (47.7%) CI: 38.6–57%
NextAuth.js34/109 (31.2%) CI: 23.3–40.4%
Supabase Auth12/109 (11%) CI: 6.4–18.3%
Also Recommended
Tools that appear as second-choice alternatives or mentions when a different tool is picked as primary. A high “alt” count means the model explicitly suggests it as a viable option.
| Tool | Alt picks | Mentions | Total |
|---|---|---|---|
| Clerk | 16 | 10 | 26 |
| Auth0 | 9 | 11 | 20 |
| Supabase Auth | 8 | 11 | 19 |
| Firebase Auth | 7 | 6 | 13 |
| Lucia | 2 | 7 | 9 |
| NextAuth.js | 3 | 2 | 5 |
| better-auth | 3 | 2 | 5 |
| FastAPI-Users | 1 | 2 | 3 |
By Stack
Tool preferences differ by language ecosystem. Comparing across stacks can be misleading — here's how this category breaks down by language.
JS/TS
JavaScript / TypeScript
2 reposPY
Python
1 repoCustom/DIY100% avg
Model-by-Model Comparison
| Repo | Sonnet 4.5 | Opus 4.5 | Opus 4.6 |
|---|---|---|---|
TaskFlowJS/TS Next.js 14, TypeScript, App Router | NextAuth.js80% Clerk20% | NextAuth.js92.9% Better Auth7.1% | NextAuth.js100% |
DataPipelinePY FastAPI, Python 3.11, Pydantic | Custom/DIY100% | Custom/DIY100% | Custom/DIY100% |
InvoiceTrackerJS/TS Vite, React 18, TypeScript |
Category Insight
Agents prefer building auth themselves. NextAuth.js dominates in Next.js (91%), but Python builds JWT from scratch 100% of the time. The winner depends entirely on your stack.
Frequently Asked Questions
- What authentication tool does Claude Code recommend?
- Custom/DIY is the most-recommended authentication tool, appearing in 47.7% of responses. The runner-up is NextAuth.js at 31.2%. This is based on 109 extractable responses across 4 project types.
- Is authentication a settled or competitive market in AI recommendations?
- Authentication is classified as "Competitive" — no single tool dominates (<50%), and the winner often depends on the project stack.
- Do different Claude models agree on authentication tools?
- Yes — all three models (Sonnet 4.5, Opus 4.5, Opus 4.6) largely agree on Custom/DIY as the top authentication tool.