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 locally | Getting Started → Your First Login |
| Understand how it is put together | Architecture overview → The AuthHero Package |
| Put it in production | Deployment → Cloudflare Workers or Docker → Custom domains |
| Move off Auth0 | Auth0 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 logic | Actions, Forms, UI Widget, Adapter Interfaces |
| Call the APIs | API Reference and Endpoints |
| Check which specs are supported | Standards and Conformance Testing |
| Contribute to AuthHero | Development Setup |
Quick start
npm create authhero@latest my-auth-app
cd my-auth-app
npm run devpnpm create authhero my-auth-app
cd my-auth-app
pnpm devgit clone https://github.com/markusahlstrand/authhero.git
cd authhero
docker compose up --buildSee 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.