Documentation
¶
Overview ¶
Command api is an example Go API built on the auth module. It serves the Next.js template (templates/nextjs) in development and in its end-to-end tests, and shows how a project wires auth.New.
It prints emails, with their live links, instead of sending them, so it must never be deployed.
Settings, from environment variables:
DATABASE_URL Postgres connection string (required)
ENCRYPTION_KEY 32 random bytes, base64 (required)
PORT port to listen on (default 8080)
APP_URL the web app's URL, for links (default http://localhost:3000)
MAIL_FILE file to append emails to (default: standard output)
TRUSTED_PROXIES comma-separated networks allowed to forward the
client's IP and user agent (default: loopback)
DISABLE_BREACH_CHECK "true" skips Have I Been Pwned, for tests that
mustn't use the network
GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GITHUB_CLIENT_ID,
GITHUB_CLIENT_SECRET turn on those providers when set
Click to show internal directories.
Click to hide internal directories.