Fix session status check to preserve authentication state

Remove /api/auth/status from public routes so it receives Authentik headers.
Remove logic that was clearing local auth state, which caused the page to
show "No autenticado" even when user was authenticated.

Now the button only displays session status without modifying the UI state.
This commit is contained in:
2025-10-13 01:40:49 -06:00
parent ddea20376d
commit f6ba3dff5e
2 changed files with 1 additions and 14 deletions

View File

@@ -75,14 +75,6 @@ export const useAuthentik = () => {
icon: 'i-heroicons-check-circle',
timeout: 5000
})
// Actualizar el state local si está desincronizado
if (!authentikUser.value) {
authentikUser.value = {
...response.user,
avatar: `https://ui-avatars.com/api/?name=${encodeURIComponent(response.user.name || response.user.username)}&background=random&size=128`
}
}
} else {
// Sin sesión en Authentik
toast.add({
@@ -92,11 +84,6 @@ export const useAuthentik = () => {
icon: 'i-heroicons-exclamation-triangle',
timeout: 5000
})
// Limpiar state local si está desincronizado
if (authentikUser.value) {
authentikUser.value = null
}
}
} catch (error) {
// Error al consultar