Sign-in, 2FA & Passkeys
Zero-JS UIEmail + password verification, one-use magic links, Google & GitHub OAuth, TOTP two-factor authentication with backup codes, and WebAuthn passkeys — all on server-rendered hosted pages.
Hosted pages →Sign-in, passkeys, 2FA, OAuth 2.1 / OIDC, SAML SSO, and MCP authorization — backed by SQLite in a single folder you can move anywhere.
$ git clone https://github.com/Anmolnoor/authwapi.git && cd authwapi
$ docker build -t authwapi .
$ docker run -d --name authwapi \
-p 127.0.0.1:4000:4000 -v "$PWD/authwapi-data:/data" authwapi
$ curl http://localhost:4000/health
{"status":"ok"}./authwapi-data/
├── authwapi.db # SQLite state + migrations
├── instance.key # 0600 signing & encryption
├── bootstrap-admin-key # 1-time MCP key (24h)
├── outbox/ # local JSON emails (no SMTP)
└── backups/ # auto pre-upgrade snapshots// POST http://localhost:4000/mcp
{ "tool": "mint_agent_key",
"scope": "write", "label": "ci-agent" }
// → Scoped, revocable key + audit log entry
{ "tool": "create_user", "emailVerified": true }Complete M1–M6 auth capabilities packaged into a single container.
Email + password verification, one-use magic links, Google & GitHub OAuth, TOTP two-factor authentication with backup codes, and WebAuthn passkeys — all on server-rendered hosted pages.
Hosted pages →SQLite, signing keys, local outbox, JSON logs, and online export/import backups all live in /data. Stop the container, copy the folder, done.
Authorization code + PKCE, ID tokens, JWT access tokens, JWKS, refresh-token rotation, organizations with roles, and per-org OIDC & SAML 2.0 SSO.
Bootstrap the Admin MCP server with a one-time key, mint scoped revocable agent keys, manage users & orgs, read the audit log, and act as the OAuth authorization server for your own MCP servers via Client ID Metadata Documents.
Publishes on loopback only in every example, refuses unknown Host andOrigin headers, rate-limits auth endpoints, runs non-root on Docker & rootless Podman, and never logs tokens or verification links.
Fresh AI agents start the container, bootstrap /mcp, create users, and wire up OAuth clients from these docs alone — both on host and container-to-container.
Built from the ground up for both developers and autonomous AI agents.
docker run -d --name authwapi \
-p 127.0.0.1:4000:4000 \
-v "$PWD/data:/data" authwapiopen http://localhost:4000/sign-up
cat data/outbox/*.jsondocker exec -u 1000 authwapi \
node src/cli.ts clients create \
--redirect http://localhost:3000/cboutbox/.Read Quick start →GET /llms.txt
GET /llms-full.txt
GET /openapi.json# Read 0600 one-time key into var
# POST /mcp → mint_agent_key
{ "scope": "write", "label": "bot" }create_user · manage orgs
resource link <client> <mcp_url>
read_audit_logALLOWED_HOSTS.Read AI agent runbook →One process, zero external databases, clean security boundaries.
Build the container, create an account, and find the verification email in the local outbox.
Register an OAuth 2.1 client, run authorization code + PKCE, and verify JWT access tokens.
Use AuthWAPI as the OAuth authorization server for your own MCP servers with Client ID Metadata.
Zero-human runbook: bootstrap /mcp, mint scoped keys, create users, and read the audit log.