feat: Add optional OIDC support (#39)

This allows the API to trigger an OAuth workflow to create the JWT for authentication. For now the workflow is triggered by manually visiting `/api/login/oidc` on the frontend app until the UI repo is updated to add support.

Co-authored-by: Peter Olds <peter@olds.co>
This commit is contained in:
Yuzerion
2025-01-13 04:49:46 +08:00
committed by GitHub
parent e10e6cfe4d
commit 51f6391ded
10 changed files with 460 additions and 6 deletions

View File

@@ -8,9 +8,19 @@ GODOXY_API_JWT_SECRET=
GODOXY_API_JWT_TOKEN_TTL=1h
# API/WebUI login credentials
# Important: If using OIDC authentication, the API_USER must match the username
# provided by the OIDC provider.
GODOXY_API_USER=admin
GODOXY_API_PASSWORD=password
# OIDC Configuration (optional)
# Uncomment and configure these values to enable OIDC authentication.
# GODOXY_OIDC_ISSUER_URL=https://accounts.google.com
# GODOXY_OIDC_CLIENT_ID=your-client-id
# GODOXY_OIDC_CLIENT_SECRET=your-client-secret
# Keep /api/auth/callback as the redirect URL, change the domain to match your setup.
# GODOXY_OIDC_REDIRECT_URL=https://your-domain/api/auth/callback
# Proxy listening address
GODOXY_HTTP_ADDR=:80
GODOXY_HTTPS_ADDR=:443