Add login button to 'No Session' toast notifications
All checks were successful
build-and-deploy / build (push) Successful in 54s
build-and-deploy / deploy (push) Successful in 4s

Add 'Iniciar Sesión' button to toasts when session is not active.
Clicking the button reloads the page, triggering Authentik redirect
to login flow.

Also increased toast timeout from 5s to 10s to give users more time
to see and click the login button.
This commit is contained in:
2025-10-13 01:52:33 -06:00
parent 00c5657b0a
commit 5676647f0f

View File

@@ -82,7 +82,14 @@ export const useAuthentik = () => {
description: 'No hay sesión activa en Authentik',
color: 'warning',
icon: 'i-heroicons-exclamation-triangle',
timeout: 5000
timeout: 10000,
actions: [{
label: 'Iniciar Sesión',
click: () => {
// Recargar la página forzará a Authentik a redirigir al login
window.location.reload()
}
}]
})
}
} catch (error) {
@@ -100,7 +107,14 @@ export const useAuthentik = () => {
description: 'No hay sesión activa en Authentik',
color: 'warning',
icon: 'i-heroicons-exclamation-triangle',
timeout: 5000
timeout: 10000,
actions: [{
label: 'Iniciar Sesión',
click: () => {
// Recargar la página forzará a Authentik a redirigir al login
window.location.reload()
}
}]
})
} else {
// Error real de red o servidor