/ tool-comparisons / Auth.js vs Hanko for Solo Developers
tool-comparisons 9 min read

Auth.js vs Hanko for Solo Developers

Comparing Auth.js and Hanko for solo developers.

Hero image for Auth.js vs Hanko for Solo Developers

Two open-source authentication solutions, two very different design philosophies. Auth.js is a library you embed in your JavaScript app. Hanko is a standalone service with drop-in UI components and a passkey-first approach. For solo developers, the decision comes down to how much you want to own the auth experience versus how much you want to delegate it.

Auth.js Overview

Auth.js (formerly NextAuth.js) is an authentication library for JavaScript frameworks including Next.js, SvelteKit, Remix, and Express. It handles OAuth flows, email/magic link sign-in, credential-based login, and session management. Everything runs inside your application with no external service required.

You configure providers in a single file, connect a database adapter, and Auth.js manages the rest. Sessions can be stored as JWTs or in your database. The library provides callbacks for customizing tokens, sessions, and sign-in behavior. With support for over 80 OAuth providers, you can add social login for nearly any platform.

The cost is zero. No MAU limits, no paid tiers, no vendor dependency. You own everything.

Hanko Overview

Hanko is an open-source, passwordless-first authentication platform. It runs as a standalone Go service (or via Hanko Cloud) and provides web components (<hanko-auth> and <hanko-profile>) that you embed in your frontend. These components render a complete authentication UI including passkey registration, email passcodes, and social login.

The core philosophy is that passwords are a legacy pattern. Hanko puts passkeys and WebAuthn front and center. Users register with a passkey on their first visit, and subsequent logins are a single biometric tap. Email passcodes serve as the fallback. Traditional passwords are optional and disabled by default.

Hanko Cloud offers a free tier at 10,000 MAU. Self-hosting the Go binary is straightforward and gives you unlimited users.

Comparison Table

Feature Auth.js Hanko
Type Library (in your app) Standalone service
Latest version next-auth 4.24.14 stable, v5.0.0-beta.31 backend v2.5.0, hanko-elements 2.6.0
License ISC Backend AGPL-3.0, frontend MIT
Cost Free, unlimited Free 10K MAU (cloud Starter) or self-host free
GitHub stars 28,259 8,939
npm weekly downloads 4.24M (next-auth) plus 3.09M (@auth/core) 4.4K (@teamhanko/hanko-elements)
Passkey support Limited First-class, core feature
UI components None (build your own) Drop-in web components
OAuth providers 80+ preconfigured Google, Apple, GitHub, Microsoft, plus custom OIDC
Email/password Yes Optional (off by default)
Magic links Yes Email passcodes
Session storage JWT or database JWT (issued by Hanko)
Framework support Next.js, SvelteKit, Express, Qwik Framework-agnostic web components
Primary language TypeScript Go (backend)
Infrastructure None Go binary or cloud
Customization Full code-level control CSS variables, component slots
Database Your app's DB via adapters Hanko's own user store
Community size Large (NextAuth legacy) Smaller, growing
Learning curve Low-moderate Low

By the Numbers (2026)

Marketing copy is one thing. Here is what the actual data says, all checked on 2026-05-28.

Auth.js (nextauthjs/next-auth)

  • 28,259 stars on GitHub, with 4,043 forks. Written in TypeScript and released under the ISC license.
  • The stable line is next-auth@4.24.14, published 2026-04-14. The v5 rewrite (rebranded to Auth.js with the framework-agnostic @auth/core) is still in beta as 5.0.0-beta.31, also from 2026-04-14, and @auth/core@0.34.3 shipped 2025-10-29.
  • npm tells the adoption story bluntly. next-auth pulled 4,243,516 downloads in the week of 2026-05-21 to 2026-05-27, and the v5 core package @auth/core added another 3,086,960 in the same week.
  • Over 80 OAuth providers ship preconfigured. Official framework packages cover Next.js (next-auth), SvelteKit (@auth/sveltekit), Express (@auth/express), and Qwik (@auth/qwik).

Hanko (teamhanko/hanko)

  • 8,939 stars on GitHub, with 1,014 forks. The backend is written in Go and released under AGPL-3.0, while the frontend packages (hanko-elements, hanko-frontend-sdk) are MIT.
  • The latest backend release is backend/v2.5.0 from 2026-03-03. The web-component package @teamhanko/hanko-elements is at 2.6.0, published 2026-04-08.
  • npm weekly downloads for @teamhanko/hanko-elements were 4,419 in the week of 2026-05-21 to 2026-05-27. That is the gap between an established library and a younger, service-shaped product, not a quality verdict, since most of Hanko's surface area is the Go backend and the hosted cloud rather than an npm install.
  • Built-in social login covers Google, Apple, GitHub, and Microsoft, plus custom OAuth/OIDC providers through the third-party config.

The headline contrast is not subtle. Auth.js downloads outnumber Hanko's by roughly three orders of magnitude. That buys you battle-tested edge cases, Stack Overflow answers for almost any error string, and AI assistants that already know the API. Hanko trades that ecosystem for a passkey-first design and a UI you do not have to build.

Real Cost at Solo-Dev Scale

Both tools can cost you nothing, but the zero arrives differently, and that matters once you grow.

Auth.js is a library. There is no usage tier and no per-user meter, ever. Whether you have 100 users or 1,000,000, the software cost stays at zero. You pay only for the database and server you were already running.

Hanko gives you two free paths and one paid one. Self-hosting the Go backend is free with unlimited users under AGPL-3.0 (the catch is the AGPL copyleft, which you should read if you ship a modified Hanko inside a closed product). Hanko Cloud has a Starter tier that is free up to 10,000 monthly active users across 2 projects. Above that you move to the Pro tier.

Here is the Pro math, using Hanko's stated rates (Pro is $29/month and includes the first 10,000 MAU, then $0.01 per MAU above 10,000), where a monthly active user is anyone Hanko issues or validates a session token for in that month.

Monthly active users Auth.js (library) Hanko Cloud Pro
5,000 $0 (free Starter covers it) $0 (free Starter covers it)
10,000 $0 $0 (free Starter ceiling)
25,000 $0 $29 base + 15,000 x $0.01 = $179/mo
50,000 $0 $29 base + 40,000 x $0.01 = $429/mo
100,000 $0 $29 base + 90,000 x $0.01 = $929/mo

A few honest caveats on that table. Auth.js still costs real money in your own infrastructure, your time writing and maintaining the UI, and the operational load of being your own auth team. Hanko Cloud's bill buys you a managed service, hosted passkey infrastructure, and zero UI work, which is exactly what a solo developer is short on. And both companies can change pricing, so treat the per-MAU rate as a snapshot, not a contract. The point is the shape of the curve. Auth.js is flat, Hanko Cloud is metered, and the crossover happens the moment you cross the 10,000-MAU free ceiling and decide self-hosting is more hassle than $29 plus a penny per user.

When to Pick Auth.js

Auth.js is the better choice when you want full control over the authentication experience inside your JavaScript application:

  • You are building with Next.js, SvelteKit, or another supported framework and want auth baked in.
  • You need a wide variety of OAuth providers (80+ supported).
  • Custom login UI matters to your brand. You want to design every pixel.
  • Keeping user data in your own database through adapters is important to you.
  • You prefer a library approach with no external services to manage.
  • Password-based login is still a requirement for your user base.

Auth.js gives you the building blocks. You assemble them into whatever auth experience your app requires. The tradeoff is that you write more code, especially for the UI layer.

When to Pick Hanko

Hanko makes sense when you want a modern, passwordless authentication experience with minimal frontend work:

  • Passkeys are a priority and you want them to work perfectly out of the box.
  • Drop-in UI components that handle the entire login flow save you significant development time.
  • You are building a framework-agnostic app or using something Auth.js does not support.
  • A standalone auth service fits your architecture better than an embedded library.
  • You want to bet on the passwordless future and make that a feature of your product.

The drop-in components are genuinely useful for solo developers. Instead of building login forms, handling validation, managing error states, and implementing passkey flows, you add a single HTML element and style it with CSS variables.

Verdict

Auth.js is the pragmatic choice for most solo developers today. It has a larger community, more OAuth providers, proven stability across thousands of production apps, and the flexibility to build exactly the auth experience you want. If you are using Next.js or SvelteKit, it is the natural fit.

Hanko is the forward-looking choice. If you believe passkeys will become the default login method (and the industry is moving that direction), Hanko gives you a head start with a purpose-built implementation. The drop-in components also save real development hours. The tradeoff is a smaller ecosystem and fewer OAuth integrations.

For a solo developer shipping a product today, start with Auth.js. For a solo developer building something where the login experience itself is a differentiator, or where you genuinely want to go passwordless, Hanko is worth the investment.

Sources

All figures checked on 2026-05-28.

Built by Kevin

Like this? You'll like what I'm building too.

Two ways to support and get more of this work.

Desktop App

HEARTH

A privacy-first Life OS for your desktop. Journal, tasks, and notes that stay on your machine. Coming soon, direct download from this site.

Read more
Digital Products

MY TOOLKITS

Receipts-first toolkits for shipping after hours, building Claude agents, publishing on Amazon, and more. The exact methods I used, not theory.

Browse on Whop

Need This Built?

Kevin builds products solo, from first version to live. If you want something like this made, work with him.