A Auth API docs

Go · Gin · PostgreSQL · Redis

Authentication your apps
can actually rely on.

A self-hosted auth API with password and social login, TOTP/email/SMS/passkey two-factor, multi-tenant RBAC, an OIDC provider and an admin GUI — all behind one small, auditable Go service.

Admin dashboard: users, tenants, applications, active sessions and recent authentication activity
The admin GUI that ships with the API — users, tenants, applications, sessions and a live activity feed.

Start here

What the API is, how it is put together, and the five-minute path to a running instance.

Integrate

Registration, login, refresh rotation, 2FA, sessions, SSO and webhooks for your frontend.

Deploy & operate

Configuration, email, migrations, backups and upgrades for a self-hosted deployment.

API reference

Every endpoint and schema, generated from the OpenAPI definition that ships with the service.

In the box

Password & tokens

Registration, login, refresh-token rotation, logout with Redis-backed JWT blacklisting, per-app password policies.

Social login

Google, Facebook and GitHub with account linking, merge confirmation and HMAC-signed single-use OAuth state.

Two-factor

TOTP, email, SMS, backup email and passkeys — plus recovery codes, trusted devices and SMS recovery fallback.

Multi-tenancy & RBAC

Tenants own applications; applications own users, roles, permissions, branding and settings.

OIDC & SSO

Act as an OpenID provider for a single app, or link apps in a session group with cross-app logout.

Operations

Admin GUI, webhooks, activity logs with anomaly detection, health and Prometheus metrics.

A look inside

Email templates page listing the global defaults with their engine, scope and active state
Email templates — global or per application, three engines, preview before saving.
My Account page with authenticator app, email 2FA, passkeys, backup email and magic link options
Self-service security: authenticator, email 2FA, passkeys, backup email and magic links.
System health page showing PostgreSQL and Redis up, authentication metrics and database pool usage
Operations: PostgreSQL and Redis health, authentication metrics and the connection pool.

Five minutes to a token

Start the stack with Docker Compose, apply the migrations and create the admin account:

  • PostgreSQL and Redis come up with the compose file
  • The API auto-migrates the schema on boot
  • The admin GUI and the Swagger UI are served by the same process

Full quickstart →

docker compose up -d
make setup-admin

# register and log in
curl -sX POST http://localhost:8080/register \
  -H "X-App-ID: 00000000-0000-0000-0000-000000000001" \
  -H "Content-Type: application/json" \
  -d '{"email":"user@example.com","password":"Str0ng!Passw0rd"}'

curl -sX POST http://localhost:8080/login \
  -H "X-App-ID: 00000000-0000-0000-0000-000000000001" \
  -H "Content-Type: application/json" \
  -d '{"email":"user@example.com","password":"Str0ng!Passw0rd"}'