BREAKING CHANGE: Auth routes moved from /auth/* to /api/auth/* - Move server/routes/auth/ to server/api/auth/ - Update login.vue to use /api/auth/authentik - Update UserMenu.vue to use /api/auth/logout - Remove old server/routes/ structure - server/api/ is better supported in Nuxt 4 IMPORTANT: Update these in Gitea: - Variable NUXT_OAUTH_AUTHENTIK_REDIRECT_URL to: https://seguidordelotes.nucleoriofrio.com/api/auth/authentik - Update Authentik redirect URI to: https://seguidordelotes.nucleoriofrio.com/api/auth/authentik
32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
/**
|
|
* Debug Config Endpoint
|
|
* Ruta: /api/debug-config
|
|
*
|
|
* TEMPORAL: Para verificar que las variables de entorno se estén cargando
|
|
* BORRAR EN PRODUCCIÓN
|
|
*/
|
|
export default defineEventHandler((event) => {
|
|
const runtimeConfig = useRuntimeConfig(event)
|
|
|
|
return {
|
|
oauth: {
|
|
authentik: {
|
|
clientId: runtimeConfig.oauth.authentik.clientId ? 'SET (hidden)' : 'MISSING',
|
|
clientSecret: runtimeConfig.oauth.authentik.clientSecret ? 'SET (hidden)' : 'MISSING',
|
|
serverUrl: runtimeConfig.oauth.authentik.serverUrl || 'MISSING',
|
|
redirectURL: runtimeConfig.oauth.authentik.redirectURL || 'MISSING',
|
|
}
|
|
},
|
|
public: {
|
|
appUrl: runtimeConfig.public.appUrl || 'MISSING'
|
|
},
|
|
env: {
|
|
NODE_ENV: process.env.NODE_ENV,
|
|
// Verificar directamente las env vars
|
|
NUXT_OAUTH_AUTHENTIK_SERVER_URL: process.env.NUXT_OAUTH_AUTHENTIK_SERVER_URL || 'MISSING',
|
|
NUXT_OAUTH_AUTHENTIK_REDIRECT_URL: process.env.NUXT_OAUTH_AUTHENTIK_REDIRECT_URL || 'MISSING',
|
|
NUXT_PUBLIC_APP_URL: process.env.NUXT_PUBLIC_APP_URL || 'MISSING',
|
|
}
|
|
}
|
|
})
|