Commit Graph

7 Commits

Author SHA1 Message Date
5676647f0f 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.
2025-10-13 01:52:33 -06:00
00c5657b0a Handle session expiration correctly and fix icon CORS errors
All checks were successful
build-and-deploy / build (push) Successful in 52s
build-and-deploy / deploy (push) Successful in 3s
- Detect CORS/redirect errors from Authentik and interpret them as
  "no session" instead of generic error
- When session expires, Authentik returns 302 redirect to login which
  causes CORS error in fetch requests
- Add /api/_nuxt_icon/ to public routes to prevent icon load failures
  after logout

This fixes the issue where logout in Authentik showed "Error" instead
of "Sin Sesión" when checking session status.
2025-10-13 01:49:20 -06:00
f6ba3dff5e Fix session status check to preserve authentication state
All checks were successful
build-and-deploy / build (push) Successful in 50s
build-and-deploy / deploy (push) Successful in 3s
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.
2025-10-13 01:40:49 -06:00
2fc478dd07 Make session status check query Authentik actively
All checks were successful
build-and-deploy / build (push) Successful in 50s
build-and-deploy / deploy (push) Successful in 3s
Create real-time session verification against Authentik:
- Add /api/auth/status endpoint that reads Authentik headers live
- Modify checkSessionStatus() to fetch from API instead of local state
- Show "Verifying..." toast while checking
- Sync local state with actual Authentik session status
- Handle connection errors gracefully

This ensures the status check reflects the current Authentik session,
not just the cached local state.
2025-10-13 01:27:51 -06:00
b7285316cf Add session status check button
All checks were successful
build-and-deploy / build (push) Successful in 51s
build-and-deploy / deploy (push) Successful in 3s
Add new button to check and display current session status:
- New checkSessionStatus() function in useAuthentik composable
- Displays toast notification with session info
- Shows user name if authenticated or warning if not
- Add UNotifications component to app.vue to render toasts

This allows users to quickly verify their authentication status.
2025-10-13 01:20:45 -06:00
98c674924b Fix logout to invalidate complete Authentik session
All checks were successful
build-and-deploy / build (push) Successful in 49s
build-and-deploy / deploy (push) Successful in 3s
- Change logout endpoint from proxy-only to full invalidation
- Use /flows/-/default/invalidation/ endpoint
- Add NUXT_PUBLIC_AUTHENTIK_URL to runtime config
- Logout now closes session in all applications
- Prevents automatic re-authentication after logout
2025-10-12 23:19:46 -06:00
a0a31e8dce Fix: Move composables and components into app/ directory
All checks were successful
build-and-deploy / build (push) Successful in 45s
build-and-deploy / deploy (push) Successful in 3s
- Resolve SSR error "useAuthentik is not defined"
- Follow Nuxt 4 directory structure conventions
- When app/ exists, all app directories must be inside it
- This enables proper auto-import of composables
2025-10-12 23:08:55 -06:00