Add debug logging and config endpoint
- 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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user