From 5676647f0f0efff0bc3df52a2370706970f69733 Mon Sep 17 00:00:00 2001 From: josedario87 Date: Mon, 13 Oct 2025 01:52:33 -0600 Subject: [PATCH] Add login button to 'No Session' toast notifications MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- nuxt4/app/composables/useAuthentik.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/nuxt4/app/composables/useAuthentik.ts b/nuxt4/app/composables/useAuthentik.ts index 611600c..4a88c54 100644 --- a/nuxt4/app/composables/useAuthentik.ts +++ b/nuxt4/app/composables/useAuthentik.ts @@ -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