Skip to content

Configuration and Environment

Frody edited this page Sep 4, 2026 · 1 revision

Configuration and Environment Reference

AuthForge strictly follows 12-factor application design, allowing every operational setting to be tuned using environment variables or Spring Boot properties.


1. Environment Variables Catalog

Variable Default Value Production Recommendation
DB_URL jdbc:postgresql://localhost:5432/authforge Point to your managed database (RDS / Cloud SQL)
DB_USERNAME authforge Least-privilege DB user
DB_PASSWORD authforge Strong secret stored in Vault/AWS Secrets Manager
JWT_SECRET (Default 256-bit development string) 256-bit+ cryptographically random secret key
JWT_ACCESS_TOKEN_EXPIRATION 900000 (15 minutes) 10 to 30 minutes
JWT_REFRESH_TOKEN_EXPIRATION 604800000 (7 days) 7 to 30 days
RATE_LIMIT_RPM 30 30 to 60 requests per minute
GOOGLE_CLIENT_ID google-client-id Google Cloud Console OAuth Client ID
GOOGLE_CLIENT_SECRET google-client-secret Google OAuth Client Secret
GITHUB_CLIENT_ID github-client-id GitHub Developer Settings OAuth Client ID
GITHUB_CLIENT_SECRET github-client-secret GitHub OAuth Client Secret
CORS_ORIGINS http://localhost:4000 Comma-delimited list of trusted client origins

2. Dynamic Feature Flags

Enable or disable identity modules at runtime without touching code:

# Example: Disable social OAuth2 and email verification in private VPC staging
FEATURE_OAUTH2=false
FEATURE_EMAIL=false

Clone this wiki locally