Minimal server (magic links + email/password)
Add Postgres storage
Replacememory.New() with the Postgres adapter for persistent sessions:
Mounted endpoints
a.Mount(r) wires the following routes:
OAuth providers (
GET /auth/providers/{name}/start and /callback): 12 built-in providers, including github, google, microsoft, discord, apple, facebook, slack, gitlab, bitbucket, twitch, linkedin, and x. See Add an OAuth Provider for the full list.
WebAuthn: /auth/webauthn/register/{begin,finish}, /auth/webauthn/login/{begin,finish}, /auth/webauthn/credentials.
TOTP: /auth/totp/enroll/{begin,finish}, /auth/totp/verify, /auth/totp/recovery, DELETE /auth/totp.
Next steps
- Storage Backends - Memory vs Postgres, migration strategy.
- Add an OAuth Provider - Wire GitHub, Google, Microsoft, or Discord.
- Enable WebAuthn Passkeys - Passkey registration and discoverable login.
- Configuration Reference - Full
theauth.Configshape.