Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Recipes

Summary: one short page for each task, with code that compiles. Find your task here.
Key terms: recipe, feature, start, route, device, tenant, recovery, client, e2ee.
Related: Interfaces · Concepts · skill for agents

Each recipe shows how to add one capability to an application, with code that compiles. Find the task in the table, copy the code, and adapt the names. The table lists the auth-chad crate feature that each recipe needs.

The recipes

You needRecipeFeature
Passkey accounts in a new applicationstartaxum, sqlite or postgres
A handler that needs a userprotect-a-routeaxum
The passkey again before a risky actionsensitive-actionaxum
Invite only, adminsinvitesaxum
Your own tables in the same transactionown-tablessqlite, postgres
A CLI, device or machinedevicesaxum
Other apps as clients (OAuth, MCP)connected-appsaxum
An API key for a program that can only send a header (not recommended)api-keysaxum
A way back into an accountrecoveryaxum
“Sign in with…”, company loginexternal-loginaxum
Organizations with members (tenants)tenantsaxum
Data of each tenant or user in its own databasedirectoryaxum, postgres
Many processes, a load balancer, the workerload-balanceraxum
A CLI or a Rust/wasm web app as a clientclientclient
End-to-end encryptione2eee2ee
Support staff who see the application as a userview-asaxum
Teststestingdev-dependency auth-chad-testing
A Loco or SeaORM applicationlocoauth-chad-loco, or sea-orm

How recipes stay correct

  • The Rust code on the recipe pages and on the wiki pages compiles: rust/recipes includes each page as a documentation test. A new page goes into rust/recipes/src/lib.rs.
  • A recipe shows one task. The wiki pages explain the reasons, and the spec has the exact rules.