Auth Service is configured entirely via environment variables — there are no hardcoded values anywhere in the codebase. Every sensitive credential, infrastructure address, and behavioral toggle is injected at runtime through the environment. In theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ricardomb-tech/auth-service/llms.txt
Use this file to discover all available pages before exploring further.
prod Spring profile there are no fallback defaults: if a required variable is absent or blank, the application context will refuse to start, making misconfiguration impossible to overlook in production.
Variable Groups
Database
Auth Service connects to a PostgreSQL 15 database. All five variables are required in every profile.Hostname or IP address of the PostgreSQL server.Example:
localhostTCP port the PostgreSQL server listens on.Example:
5432Name of the PostgreSQL database.Example:
auth_servicePostgreSQL username used to connect.Example:
auth_servicePassword for the PostgreSQL user.Example:
auth_service (change in any non-local environment)JWT
Auth Service signs JWT access tokens with HS256 using a pair of secrets — one active, one previous — to support zero-downtime secret rotation. See JWT Tokens for the full rotation procedure.The active signing secret. New tokens are always signed with this key; incoming tokens are validated against it first.Must be a Base64-encoded random value of at least 256 bits (32 bytes). Generate one with:
The previous signing secret, used only for validation during a rolling key rotation. Leave blank (or omit) when not actively rotating.Default: (empty — rotation inactive)
OAuth2
Social login credentials and the frontend redirect targets for the OAuth2 callback flow. All six variables are required when OAuth2 login is enabled.OAuth2 Client ID obtained from the Google Cloud Console.
OAuth2 Client Secret obtained from the Google Cloud Console.
OAuth App Client ID from GitHub Settings → Developer settings → OAuth Apps.
OAuth App Client Secret from GitHub Settings.
The frontend URL to which the browser is redirected after a successful OAuth2 login. A short-lived, one-time exchange
code is appended as a query parameter — not the JWT itself. The frontend must call POST /auth/oauth2/exchange to redeem that code for the actual token pair.Example: http://localhost:3000/oauth2/successThe frontend URL to which the browser is redirected when OAuth2 login fails (provider error, unverified email, etc.).Example:
http://localhost:3000/oauth2/failureAdmin
Initial administrator account provisioned at startup (Epic 4). Both variables must be set together.Email address for the initial admin account.
Password for the initial admin account. Use a strong, randomly generated value in all non-local environments.
docker-compose.yml — captures all outgoing mail so nothing reaches real inboxes.
Hostname of the SMTP server.Dev default:
localhost (MailHog)SMTP port.Dev default:
1025 (MailHog)Messaging
Auth Service publishes domain events to a Kafka-compatible broker (Redpanda in development). The broker is already running viadocker-compose.yml; event consumption is implemented in Epic 6.
Comma-separated list of Kafka/Redpanda bootstrap server addresses.Example:
localhost:9092App
The public base URL of the Auth Service itself. Used to construct links in outgoing emails (e.g. the account verification link).Example:
http://localhost:8080Complete .env Example
Copy .env.example to .env and fill in your values before starting the service.
The
prod Spring profile (application-prod.properties) declares no default values for any variable. If a required environment variable is missing or blank when the service starts, Spring Boot’s configuration binding will throw an IllegalStateException and abort startup immediately — rather than silently using an empty or insecure value.