Add debug logging and config endpoint
All checks were successful
build-and-deploy / build (push) Successful in 7s
build-and-deploy / deploy (push) Successful in 3s

- Add console.log in oauth-authentik.ts to debug config
- Add /api/debug-config endpoint to verify env vars
- Helps diagnose missing serverUrl issue
This commit is contained in:
2025-10-11 17:33:15 -06:00
parent 3de76369c0
commit 3b10aeed9e
2 changed files with 39 additions and 0 deletions

View File

@@ -54,6 +54,14 @@ export function oauthAuthentikEventHandler({
return eventHandler(async (event: H3Event) => {
const runtimeConfig = useRuntimeConfig(event)
// Debug: Log configuration
console.log('OAuth Authentik Config:', {
clientId: runtimeConfig.oauth.authentik.clientId ? '***' : 'MISSING',
clientSecret: runtimeConfig.oauth.authentik.clientSecret ? '***' : 'MISSING',
serverUrl: runtimeConfig.oauth.authentik.serverUrl,
redirectURL: runtimeConfig.oauth.authentik.redirectURL,
})
// Merge config with defaults
const authentikConfig = defu(config, {
clientId: runtimeConfig.oauth.authentik.clientId,