e28c6b925e815903b68a638e50172248f0aa7fbd
Document missing OAuth2 features and security improvements: - State parameter for CSRF protection - PKCE implementation - Refresh tokens and expiration handling - SSO logout with Authentik - Redirect after login - RBAC middleware - Session timeout warnings - Auto-refresh mechanisms Organized by priority with code examples and references.
Nuxt 4 + Authentik OAuth + PWA Template
Template de aplicación Nuxt 4 con autenticación OAuth/OIDC usando Authentik y funcionalidad PWA (Progressive Web App).
🚀 Características
- ✅ Nuxt 4 - Framework Vue.js de última generación
- ✅ Autenticación OAuth/OIDC - Integración con Authentik
- ✅ PWA - Funciona offline con Service Workers
- ✅ Docker - Despliegue con Docker Compose
- ✅ Traefik - Configurado para reverse proxy
- ✅ Gitea Actions - CI/CD automático incluido
- ✅ TypeScript - Tipado estático
- ✅ Nuxt UI - Componentes UI modernos
📋 Requisitos Previos
- Docker y Docker Compose
- Authentik corriendo (en la misma red Docker)
- Traefik como reverse proxy
- Gitea (opcional, para CI/CD)
🛠️ Instalación Rápida
-
Clona el repositorio
git clone https://tu-repo.git cd seguidor-lotes -
Configura variables de entorno (ver
SETUP.mdpara detalles) -
Despliega
docker-compose up -d
📖 Documentación Completa
Ver SETUP.md para:
- Configuración detallada de Authentik
- Variables de entorno requeridas
- Configuración de Gitea Actions
- Troubleshooting
- Personalización
🏗️ Estructura del Proyecto
├── .gitea/
│ └── workflows/ # CI/CD workflows
├── nuxt4-app/
│ ├── app/
│ │ ├── components/ # Componentes Vue
│ │ ├── middleware/ # Middleware de autenticación
│ │ └── pages/ # Páginas de la aplicación
│ ├── server/
│ │ └── api/ # API endpoints
│ │ ├── auth/ # Rutas de autenticación OAuth
│ │ └── protected.get.ts # Ejemplo de API protegida
│ ├── public/ # Assets estáticos y PWA icons
│ ├── nuxt.config.ts # Configuración de Nuxt
│ └── Dockerfile # Dockerfile para producción
├── docker-compose.yml # Configuración de Docker Compose
└── SETUP.md # Guía de configuración detallada
🔐 Autenticación
El template implementa OAuth 2.0 / OpenID Connect con:
- Login con Authentik
- Protección de rutas con middleware
- Protección de APIs con
requireUserSession - Información de usuario (email, nombre, grupos)
- Logout completo
🎨 Personalización
- Cambiar nombre de la app: Edita
nuxt4-app/nuxt.config.ts - Añadir páginas protegidas: Usa
definePageMeta({ middleware: 'auth' }) - Crear APIs protegidas: Usa
requireUserSession(event)en tus handlers - Customizar UI: Modifica componentes en
app/components/
🐛 Troubleshooting
Problemas comunes y soluciones en SETUP.md - Sección 10
📝 Licencia
MIT
🤝 Contribuir
Este es un template base. Siéntete libre de:
- Fork el proyecto
- Crear una rama para tu feature
- Commit tus cambios
- Push a la rama
- Abrir un Pull Request
Description
Languages
Vue
45.8%
TypeScript
42.9%
PLpgSQL
5.2%
Shell
4.5%
HTML
1.2%
Other
0.4%