8000
Skip to content

Latest commit

Β 

History

3,349 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AuthHero

πŸ“š For complete documentation, visit authhero.net

AuthHero is a multi-tenant authentication system that provides identity and access management services. This is the main monorepo containing all packages and applications.

Packages

  • authhero - The main package for AuthHero that handles authentication and API requests
  • create-authhero - A CLI for creating new AuthHero projects
  • proxy - Multi-tenant reverse proxy for fronting customer custom domains with path-based routing
  • Adapters:
    • adapter-interfaces - Interfaces for creating adapters for AuthHero
    • kysely - ORM adapter for SQL databases
    • drizzle - ORM adapter for SQL databases (experimental)
    • cloudflare - Custom domains support
    • saml - SAML authentication support

Applications

  • admin - Admin interface (shadcn/ui + ra-core) for managing tenants, users, applications, and more
  • demo - Demo authentication server using the kysely adapter and SQLite
  • proxy-dev - Cloudflare Worker harness for developing/deploying @authhero/proxy
  • docs - Documentation site powered by VitePress, deployed to Cloudflare Pages at docs.authhero.net β€” see apps/docs/DEPLOYMENT.md

Quick Start

Prerequisites

Setting Up a New Project

The fastest way to get started is using the create-authhero CLI:

npm create authhero my-auth-project
cd my-auth-project
pnpm install
pnpm dev

This creates a new project with:

  • SQLite database for local development
  • Pre-configured authentication endpoints
  • Example templates you can customize

Using the Admin UI

To manage your authentication system, use the hosted admin interface:

  1. Go to manage.authhero.net
  2. Create a tenant or connect to your local instance
  3. Configure your applications, users, and authentication settings

Development

Local Setup

Clone and set up the monorepo for development:

git clone https://github.com/authhero/authhero.git
cd authhero
pnpm install

Running the Demo

Start the demo authentication server:

pnpm demo dev

This starts a local auth server at http://localhost:8787 with SQLite storage.

Running All Apps

Start all apps in development mode:

pnpm dev

This starts:

  • Demo auth server
  • Admin interface
  • Documentation site
  • All other apps in parallel

Running Specific Apps

Use these shortcuts to work with individual apps:

pnpm demo          # Work with demo app
pnpm admin         # Work with admin interface
pnpm authhero      # Work with main package
pnpm vitepress     # Work with docs

Running OIDC Conformance Tests

AuthHero is tested against the OpenID Foundation conformance suite via apps/conformance-runner, a Playwright-driven runner that boots the suite, seeds a local auth-server, and runs the oidcc-basic-certification-test-plan.

One-time setup:

  1. Clone the conformance suite into ~/conformance-suite (the scripts expect this path).
  2. Add the suite's hostname to /etc/hosts:
    127.0.0.1   localhost.emobix.co.uk
    
  3. Install Playwright's Chromium browser:
    pnpm --filter @authhero/conformance-runner exec playwright install chromium

Run the suite from the repo root:

pnpm conformance:start          # bring up the suite via Docker
pnpm conformance:run            # run the full plan
pnpm conformance:run -- --grep "discovery"   # run a single module
pnpm conformance:report         # open the last HTML report
pnpm conformance:stop           # tear down the suite

See apps/conformance-runner/README.md for environment variables and advanced options.

Contributing

We welcome contributions! Here's how to get started:

Making Changes

  1. Create a new branch for your changes:

    git checkout -b feature/my-feature
  2. Make your changes and ensure tests pass:

    pnpm test
  3. Format your code:

    pnpm format

Creating a Changeset

AuthHero uses Changesets for version management. When you make changes that should be included in the changelog, create a changeset:

pnpm changeset

This will prompt you to:

  1. Select packages - Choose which packages are affected by your changes
  2. Select version bump type:
    • Patch (0.0.x) - Bug fixes, documentation updates, non-breaking changes
    • Minor (0.x.0) - New features, non-breaking additions
    • Major (x.0.0) - Breaking changes that require users to modify their code
  3. Describe your changes - Write a summary that will appear in the changelog

The changeset will be saved as a markdown file in .changeset/ and should be committed with your changes.

Example:

$ pnpm changeset
πŸ¦‹  Which packages would you like to include? β€Ί authhero
πŸ¦‹  What kind of change is this for authhero? β€Ί minor
πŸ¦‹  Please enter a summary for this change:
    Added support for custom email templates

Submitting a Pull Request

  1. Push your branch to GitHub
  2. Open a pull request with:
    • Clear description of changes
    • Any relevant issue numbers
    • Your changeset(s) included
  3. Wait for review and CI checks to pass

Release Process

Releases are automated via GitHub Actions when changesets are merged to the main branch. The process:

  1. Changesets are collected on each PR
  2. After merge, a "Version Packages" PR is automatically created
  3. When the Version Packages PR is merged, packages are published to npm

Project Structure

authhero/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ admin/            # Admin interface (shadcn/ui + ra-core)
β”‚   β”œβ”€β”€ demo/             # Demo auth server
β”‚   β”œβ”€β”€ proxy-dev/        # Worker harness for @authhero/proxy
β”‚   └── docs/             # Documentation site
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ adapter-interfaces/
β”‚   β”œβ”€β”€ authhero/         # Main package
β”‚   β”œβ”€β”€ cloudflare/
β”‚   β”œβ”€β”€ create-authhero/  # Project generator CLI
β”‚   β”œβ”€β”€ drizzle/
β”‚   β”œβ”€β”€ kysely/
β”‚   β”œβ”€β”€ proxy/            # Multi-tenant reverse proxy library
β”‚   └── saml/
└── test/                 # Integration tests

Resources

License

AuthHero is dual-licensed under AGPL-3.0-only or a commercial license β€” see LICENSING.md for the full model and the per-package table. The integration surfaces stay permissive on purpose: @authhero/adapter-interfaces, create-authhero (and the apps it scaffolds), and @authhero/widget are MIT, so using those packages on their own imposes no AGPL obligations on your code. The AGPL-licensed packages remain subject to AGPL-3.0-only or a commercial license.

Versions published before this change remain MIT. Contributions are accepted under the CLA β€” see CONTRIBUTING.md.

About

Monorepo for authhero

Resources

Contributing

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0