Skip to content

Best auth provider for Next.js: what coding agents pick

Across 12 runs on Sonnet 5.5, Hand-rolled JWT or sessions leads with 100%, and 100% of runs used no third-party tool.

Last updated

35 scored runs1 excluded3 modelslast run Oct 18, 2026$5.41 spent

On Next.js

18 runs on the Next.js starter, all models

  1. built its own, no named pattern2 of 1811%
embed this chartfree, keep the link
<a href="https://whatagentspick.com/which-auth-provider-do-coding-agents-pick/"><img src="https://whatagentspick.com/share/auth.png" alt="Which auth provider do coding agents pick?" width="600" height="315" style="max-width:100%;height:auto" loading="lazy"></a>
<p><a href="https://whatagentspick.com/which-auth-provider-do-coding-agents-pick/">data: what agents pick</a></p>
12 runs
  1. 1Hand-rolled JWT or sessionsNo tool100%12

Pick rates by model

Tool
Hand-rolled JWT or sessions
Built its own

named in the reply, never installed

  • FastAPI Users5 runs
next.js gets resend, python gets raw smtp. 11 of 18 next.js runs used resend, 17 of 18 python runs used raw smtp

get told when the auth pick moves

weekly at most. free.

read issue 2archive

Prompts and what each one got 3
  1. auth-p1

    Add sign up and sign in to this app. Users should be able to create an account, log in, log out, and hit a route that only works when they are logged in.

    • Hand-rolled JWT or sessions12 of 12
  2. auth-p2

    I need authentication and sessions here. Protect the dashboard route so anonymous visitors are redirected, and keep the user signed in across reloads.

    • Hand-rolled JWT or sessions8 of 11
    • Built its own3 of 11
  3. auth-p3

    Set up user accounts for this project, including login, logout, and a way to read the current user on the server.

    • Hand-rolled JWT or sessions12 of 12
Starter repos 2
  • Next.js + TypeScript

    An App Router project with one page and one JSON route. Items live in a module-level array, so nothing survives a restart. No database, SDK, or platform config is present.

    app/page.tsx, app/api/items/route.ts, app/items.ts

  • Python + FastAPI

    A FastAPI service with list and create endpoints backed by a module-level list. Dependencies are limited to FastAPI, Uvicorn, and Pydantic.

    app/main.py, requirements.txt

How the runs went

Scored runs
35 of 36
Declined, changed nothing
1
Same pick on both repeats
17 of 17
Stopped at the turn cap
22 of 36
Detected from
2 dependencies, 30 imports
Average run
72 s
Spent
$5.41

Every run

loading 36 runs

every auth tool we check for

head to head

  • auth

    Clerk vs Auth.js

    Clerk0 of 35

    Auth.js / NextAuth0 of 35

    neither got installed in 35 auth runs. most common: built its own, 35 of 35 (32 as hand-rolled JWT or sessions).

how coding agents pick differently