Commit Graph

44 Commits

Author SHA1 Message Date
1c901fa877 Remove debug endpoint
All checks were successful
build-and-deploy / build (push) Successful in 52s
build-and-deploy / deploy (push) Successful in 3s
2025-10-13 03:21:59 -06:00
96fac68c6d Enhance user metadata display with app and outpost information
All checks were successful
build-and-deploy / build (push) Successful in 50s
build-and-deploy / deploy (push) Successful in 3s
- Update AuthentikUser interface to include appSlug and outpostName
- Capture x-authentik-meta-app and x-authentik-meta-outpost headers
- Improve UserMetadata component to display connection information
- Filter empty groups from groups array
- Add documentation about available Authentik headers
2025-10-13 03:20:05 -06:00
1cba2f427e Add debug endpoint to inspect Authentik headers
All checks were successful
build-and-deploy / build (push) Successful in 51s
build-and-deploy / deploy (push) Successful in 3s
2025-10-13 03:16:36 -06:00
65dee7382f Add comprehensive documentation for components, Traefik and Authentik
All checks were successful
build-and-deploy / build (push) Successful in 7s
build-and-deploy / deploy (push) Successful in 2s
- Document all authentication components architecture
  - UserAvatar, UserMetadata components
  - Individual action buttons with their specific functionality
  - useAuthentik() composable with full API documentation

- Explain Authentik Proxy Outpost flow
  - Forward Auth mechanism
  - Step-by-step authentication flow
  - Advantages of proxy-based authentication

- Detail Traefik routing configuration
  - Router 1: Public routes (PWA resources) with priority 100
  - Router 2: Protected routes with Authentik middleware
  - CORS and headers middleware explanation

- Add complete Authentik setup guide
  - Traefik middleware configuration
  - Authentik Provider and Application setup
  - Network configuration requirements

- Include troubleshooting section
  - Common errors and solutions
  - PWA offline functionality
  - Headers debugging
2025-10-13 03:11:46 -06:00
3f5c4bc820 Fix TypeScript errors in useAuthentik composable
All checks were successful
build-and-deploy / build (push) Successful in 54s
build-and-deploy / deploy (push) Successful in 4s
- Add AuthentikUser and AuthStatusResponse interfaces
- Fix toast color from 'gray' to 'neutral' (valid color)
- Remove invalid 'timeout' property from toast.add()
- Fix toast action from 'click' to 'onClick'
- Add proper type annotations for error handling
- Replace process.server with import.meta.server
- Make email, name, uid optional in AuthentikUser interface
2025-10-13 03:05:04 -06:00
d8f70f2aa5 Refactor auth components into individual button components
All checks were successful
build-and-deploy / build (push) Successful in 52s
build-and-deploy / deploy (push) Successful in 3s
- Remove StatusBadges component (badges for authenticated, connected, groups)
- Remove ActionButtons component
- Create individual button components:
  - SessionStatusButton: handles session status check
  - ProfileButton: navigates to user profile
  - LogoutButton: handles user logout
  - LoginButton: reloads page to trigger login
- Update app.vue to use new individual button components
- Improve code quality with better component separation and reusability
2025-10-13 03:00:02 -06:00
0fd25e34e6 Update offline.html with SSR+Auth limitation explanation
All checks were successful
build-and-deploy / build (push) Successful in 51s
build-and-deploy / deploy (push) Successful in 3s
- Revert CacheFirst strategy back to NetworkFirst
- Add clear technical explanation in offline.html
- Explain that full offline mode requires no-auth or SPA
- Note that UI remains functional if app is already open
2025-10-13 02:45:57 -06:00
e3fc6c924a Add offline.html to public routes (no authentication required)
All checks were successful
build-and-deploy / build (push) Successful in 8s
build-and-deploy / deploy (push) Successful in 3s
This allows the service worker to cache offline.html without Authentik redirecting to login.
2025-10-13 02:39:36 -06:00
496ff7630b Add offline fallback page for PWA
All checks were successful
build-and-deploy / build (push) Successful in 53s
build-and-deploy / deploy (push) Successful in 3s
- Create offline.html with user-friendly offline message
- Auto-redirect when connection is restored
- Use offline.html as navigateFallback instead of root
- Include offline.html in PWA assets for precaching

This ensures users see a proper offline page when opening the app without connection, instead of a browser error.
2025-10-13 02:37:34 -06:00
ec9ccece61 Improve document caching strategy for offline navigation
All checks were successful
build-and-deploy / build (push) Successful in 52s
build-and-deploy / deploy (push) Successful in 4s
- Add navigateFallbackDenylist to exclude API and auth routes
- Enhanced urlPattern to match document destination and root path
- Increase cache entries to 50 and duration to 7 days
- Add cacheableResponse for better cache control

This should enable the app to open offline after being loaded once.
2025-10-13 02:34:14 -06:00
e59f7b653d Add NetworkFirst caching strategy for navigation requests
All checks were successful
build-and-deploy / build (push) Successful in 53s
build-and-deploy / deploy (push) Successful in 3s
This enables offline navigation by caching HTML documents generated by SSR.
When offline, users can now navigate to cached pages using the service worker.
2025-10-13 02:27:32 -06:00
0a7c8d9cd0 Fix Workbox configuration: remove networkTimeoutSeconds from NetworkOnly handler
All checks were successful
build-and-deploy / build (push) Successful in 52s
build-and-deploy / deploy (push) Successful in 3s
2025-10-13 02:24:17 -06:00
87ae5b95e6 Improve PWA offline functionality and fix session caching
Some checks failed
build-and-deploy / build (push) Failing after 33s
build-and-deploy / deploy (push) Has been skipped
- Enable navigateFallback for offline navigation support
- Add JSON files to glob patterns for heroicons support
- Change Authentik API caching from NetworkFirst to NetworkOnly to prevent stale session data
- Add offline detection in checkSessionStatus with proper user feedback
- Add no-cache headers to /api/auth/status endpoint to prevent browser caching
- Show "Modo Offline" toast when user tries to check session while offline
2025-10-13 02:21:50 -06:00
226fcc7c64 Make 'Iniciar Sesión' button always visible alongside other buttons
All checks were successful
build-and-deploy / build (push) Successful in 56s
build-and-deploy / deploy (push) Successful in 3s
Change button layout to show all 4 buttons at the same time:
- Estado de Sesión (info/blue)
- Ver Perfil (primary/blue)
- Cerrar Sesión (error/red)
- Iniciar Sesión (success/green) - NEW: always visible

This allows users to force a re-authentication by clicking 'Iniciar
Sesión' even when already authenticated, triggering Authentik login flow.
2025-10-13 02:02:45 -06:00
a132fdfbf8 Add permanent 'Iniciar Sesión' button when not authenticated
All checks were successful
build-and-deploy / build (push) Successful in 54s
build-and-deploy / deploy (push) Successful in 4s
Replace 'Ver Perfil' and 'Cerrar Sesión' buttons with a prominent
'Iniciar Sesión' button when user is not authenticated. The button
reloads the page to trigger Authentik login redirect.

This provides a more accessible way to log in compared to the toast
button, which can be difficult to click.

Button layout:
- Authenticated: [Estado de Sesión] [Ver Perfil] [Cerrar Sesión]
- Not authenticated: [Estado de Sesión] [Iniciar Sesión]
2025-10-13 01:56:42 -06:00
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
ddea20376d Fix API endpoint location for Nuxt server structure
All checks were successful
build-and-deploy / build (push) Successful in 53s
build-and-deploy / deploy (push) Successful in 3s
Move /api/auth/status endpoint from app/server/ to server/ directory.
Nuxt expects server API routes to be in /server/api/, not /app/server/api/.

This fixes the issue where the endpoint was returning HTML instead of JSON.
2025-10-13 01:33:10 -06:00
51767ff0d3 Add /api/auth/status to public routes
All checks were successful
build-and-deploy / build (push) Successful in 8s
build-and-deploy / deploy (push) Successful in 3s
Make the session status check endpoint publicly accessible so it can
respond even when there's no Authentik session. This allows the
endpoint to return {"authenticated": false} instead of being
redirected to login.

Without this, Authentik intercepts the request and returns HTML
login page instead of JSON response.
2025-10-13 01:31:41 -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
5646a84be1 Fix CORS error for PWA manifest by splitting Traefik routing
All checks were successful
build-and-deploy / build (push) Successful in 7s
build-and-deploy / deploy (push) Successful in 2s
Split routing into two routers with different priorities:
- Public router (priority 100) handles PWA resources without authentication
- Protected router (priority 10) handles application routes with Authentik

Add CORS middleware for public PWA resources to allow cross-origin access
to manifest.webmanifest, service worker, and icons.

Fixes intermittent ERR_FAILED 302 and CORS errors when loading PWA manifest
from authenticated sessions.
2025-10-13 01:16:56 -06:00
ea94393fc7 Add maskable icon with solid background for Windows taskbar
All checks were successful
build-and-deploy / build (push) Successful in 51s
build-and-deploy / deploy (push) Successful in 3s
- Created icon-maskable.svg with full background (no transparency)
- Generated icon-512x512-maskable.png with 90% safe zone
- Updated manifest to use dedicated maskable icon
- Fixes white background issue on Windows taskbar/topbar
2025-10-13 01:09:52 -06:00
9e66842322 Separate icon purposes to avoid any maskable warning
All checks were successful
build-and-deploy / build (push) Successful in 51s
build-and-deploy / deploy (push) Successful in 3s
- Split icon-512x512.png into two separate entries
- One with purpose 'any' and one with purpose 'maskable'
- Avoids platform padding issues with combined purposes
2025-10-13 01:00:02 -06:00
da75f32874 Remove tablet screenshot from PWA manifest
All checks were successful
build-and-deploy / build (push) Successful in 50s
build-and-deploy / deploy (push) Successful in 3s
- Keep only desktop (wide) and mobile (narrow) screenshots
- Reduces manifest size and focuses on primary form factors
2025-10-13 00:56:31 -06:00
c19649f0ee Fix PWA icon dimensions and remove duplicate
All checks were successful
build-and-deploy / build (push) Successful in 53s
build-and-deploy / deploy (push) Successful in 3s
- Update icon-192x192.png to correct size 500x192 (was incorrectly declared as 192x192)
- Merge duplicate icon-512x512.png entries into single icon with 'any maskable' purpose
- Eliminates manifest warnings for icon size mismatches
2025-10-13 00:52:01 -06:00
512dccd2af Fix screenshot dimensions in PWA manifest
All checks were successful
build-and-deploy / build (push) Successful in 50s
build-and-deploy / deploy (push) Successful in 3s
- Update desktop screenshot to 1920x1080 (was 1280x720)
- Update mobile screenshot to 614x853 (was 375x667)
- Keep tablet screenshot at 768x1024 (correct)
2025-10-13 00:44:14 -06:00
d84f78ca2a Add PWA screenshots and window controls overlay
All checks were successful
build-and-deploy / build (push) Successful in 53s
build-and-deploy / deploy (push) Successful in 6s
- Add screenshots to manifest (desktop, tablet, mobile)
- Enable window-controls-overlay for Windows compact mode
- Fix deprecated apple-mobile-web-app-capable warning
- Add mobile-web-app-capable meta tag
2025-10-13 00:39:30 -06:00
85cc2306d5 Fix PWA manifest link injection and navigateFallback error
All checks were successful
build-and-deploy / build (push) Successful in 52s
build-and-deploy / deploy (push) Successful in 3s
- Add useHead() in app.vue to inject manifest and PWA meta tags
- Set navigateFallback to undefined to prevent non-precached-url error
- Add includeAssets configuration for PWA module
- Fixes service worker error on initial page load

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2025-10-13 00:20:19 -06:00
ef28c74504 Add PWA configuration and assets
All checks were successful
build-and-deploy / build (push) Successful in 2m13s
build-and-deploy / deploy (push) Successful in 3s
- Install and configure @vite-pwa/nuxt module
- Generate app icons in multiple sizes (192x192, 512x512, 180x180)
- Create custom SVG icon with Nuxt + Authentik branding
- Configure PWA manifest with theme colors and display options
- Add Workbox service worker with caching strategies
- Include NetworkFirst caching for Authentik API
- Generate app store screenshots (mobile, tablet, desktop)
- Enable offline functionality and auto-updates

PWA Features:
- Installable on mobile and desktop
- Offline support with service worker
- Custom splash screens and icons
- Theme color: #00DC82 (Nuxt green)
- App name: Plantilla Nuxt + Authentik
2025-10-12 23:57:30 -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
201f257129 Add Tailwind CSS and Nuxt UI imports
All checks were successful
build-and-deploy / build (push) Successful in 47s
build-and-deploy / deploy (push) Successful in 3s
- Create app/assets/css/main.css with required imports
- Configure nuxt.config.ts to load main.css
- Fix missing CSS styling issue
- Following Nuxt UI v4 setup documentation
2025-10-12 23:13:40 -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
65304fcade Fix useAuthentik composable for SSR
All checks were successful
build-and-deploy / build (push) Successful in 44s
build-and-deploy / deploy (push) Successful in 2s
- Use useState to pass server headers to client
- Fix 'useAuthentik is not defined' error
- Ensure headers are read only on server side
2025-10-12 22:56:21 -06:00
7de670d824 Add Authentik integration UI components
All checks were successful
build-and-deploy / build (push) Successful in 45s
build-and-deploy / deploy (push) Successful in 3s
- Create useAuthentik composable to read headers
- Add UserAvatar component with avatar and user info
- Add StatusBadges for auth/connection status
- Add ActionButtons for logout and profile
- Add UserMetadata component with full user details
- Integrate all components in main page
- Use Nuxt UI components throughout
2025-10-12 22:53:44 -06:00
fc46ae7a53 Fix Traefik network and Authentik middleware configuration
All checks were successful
build-and-deploy / build (push) Successful in 7s
build-and-deploy / deploy (push) Successful in 2s
- Add traefik-network to container networks (CRITICAL FIX)
- Change middleware to authentik-forward-auth@file
- Update traefik.docker.network to traefik-network
- Document network requirements
- Update Authentik configuration instructions
2025-10-12 22:39:49 -06:00
0f7abc6d48 Add automatic repository owner to image naming
All checks were successful
build-and-deploy / build (push) Successful in 14s
build-and-deploy / deploy (push) Successful in 2s
- Use github.repository_owner in workflow
- Image format: REGISTRY_URL/owner/APP_NAME:latest
- Works automatically with Gitea registry
- Template-friendly: forks use their own owner
- Update documentation with new format
2025-10-12 22:19:20 -06:00
7120d723ad Switch from OAuth to Authentik Proxy Outpost
Some checks failed
build-and-deploy / build (push) Failing after 2m51s
build-and-deploy / deploy (push) Has been skipped
- Remove all OAuth configuration (no longer needed)
- Add Authentik Proxy Outpost middleware to Traefik
- Simplify environment variables (only 4 required now)
- Update documentation with proxy outpost setup
- Document available Authentik headers
- Cleaner and simpler deployment
2025-10-12 17:37:19 -06:00
c00d0fb61a Configure deployment with Traefik and Authentik
Some checks failed
build-and-deploy / build (push) Failing after 6s
build-and-deploy / deploy (push) Has been skipped
- Add proper Traefik labels with middleware support
- Use APP_NAME variable for dynamic naming
- Remove port mapping (Traefik handles routing)
- Add .env.example with all required variables
- Update README with complete variable documentation
- Configure docker network to use 'principal'
- Add X-Forwarded-Proto header middleware
2025-10-12 17:29:18 -06:00
bfeabbc640 Improve Gitea Actions monitoring hook
Some checks failed
build-and-deploy / build (push) Failing after 6s
build-and-deploy / deploy (push) Has been skipped
- Add detailed action information (workflow, duration, branch, etc.)
- Detect and notify when Actions are disabled
- Check for API permission errors
- Add example settings.json for easy setup
- Update README with hook configuration guide
2025-10-12 17:18:59 -06:00
a86580969b Update README: Add Claude Code hooks feature
Some checks failed
build-and-deploy / build (push) Failing after 6s
build-and-deploy / deploy (push) Has been skipped
2025-10-12 17:12:53 -06:00
2a4b304b83 Fix: Load GITEA_TOKEN from bashrc in hook script 2025-10-12 17:10:14 -06:00
c794a883fa Initial commit: Nuxt 4 template with Authentik OAuth
- Add Nuxt 4 application structure
- Add Docker and docker-compose configuration
- Add Gitea Actions CI/CD workflow
- Add Claude Code hooks for action monitoring
2025-10-12 17:09:21 -06:00