Skip to content

AuthHero documentation ​

AuthHero is an open-source, multi-tenant identity platform with Auth0-compatible APIs. It runs on Cloudflare Workers, Node.js, Docker or AWS, against Drizzle (SQLite/D1), Kysely or DynamoDB. These docs cover running, extending and operating it. For the product overview, see authhero.net.

Start here ​

I want to…Read
Try AuthHero locallyGetting Started → Your First Login
Understand how it is put togetherArchitecture overview → The AuthHero Package
Put it in productionDeployment → Cloudflare Workers or Docker → Custom domains
Move off Auth0Auth0 Comparison → Lazy Migration → Bulk User Import
Run AuthHero for many customers (SaaS)Multi-Tenant SaaS → Multi-Tenancy Package
Customize login or plug in my own logicActions, Forms, UI Widget, Adapter Interfaces
Call the APIsAPI Reference and Endpoints
Check which specs are supportedStandards and Conformance Testing
Contribute to AuthHeroDevelopment Setup

Quick start ​

bash
npm create authhero@latest my-auth-app
cd my-auth-app
npm run dev
bash
pnpm create authhero my-auth-app
cd my-auth-app
pnpm dev
bash
git clone https://github.com/markusahlstrand/authhero.git
cd authhero
docker compose up --build

See Getting Started for what each option sets up.

All sections ​

Getting Started

Run AuthHero locally and sign in for the first time.

The AuthHero Book

Authentication from first principles and how AuthHero handles it, in sixteen chapters read in order.

Architecture

How the pieces fit: the core package, adapters, universal login, sessions and the hooks pipeline.

Entities

The data model: tenants, users, organizations, applications, connections and tokens.

Features

Auth flows, MFA, actions and hooks, forms, invitations, SCIM, audit logging and more.

Standards

The OAuth 2.0, OpenID Connect and SAML specs AuthHero implements, and how conformance is tested.

Security Model

Scopes and permissions, management API access, tenant isolation, encryption and signing keys.

Database

Schema, migrations and wiring a database into your app.

Deployment

Docker, Cloudflare Workers (and Workers for Platforms), AWS, custom domains and cron jobs.

Customization & Extensibility

Adapters, the UI widget, embedded login, SAML, multi-tenancy and the proxy package.

Apps & Tools

The create-authhero CLI and the admin dashboard.

Auth0 Comparison

Differences from Auth0 and guides for migrating users, hooks, SAML and Terraform.

API Reference

Endpoints, pagination, error codes and other conventions of the HTTP API.

Contributing

Set up the monorepo, run the tests and cut a release.

Changelog

What changed, week by week.

Dual-licensed: AGPL-3.0-only or commercial license.