feat: integrate NextAuth for authentication, refactor login and registration processes, and enhance middleware for session management

This commit is contained in:
Julien Froidefond
2025-10-16 15:50:37 +02:00
parent 9ecdd72804
commit 7426bfb33c
33 changed files with 417 additions and 729 deletions

24
ENV.md Normal file
View File

@@ -0,0 +1,24 @@
# Variables d'environnement requises
## Production (.env)
```env
# MongoDB Configuration
MONGO_USER=admin
MONGO_PASSWORD=your-secure-password
MONGODB_URI=mongodb://admin:your-secure-password@mongodb:27017/stripstream?authSource=admin
# NextAuth Configuration
NEXTAUTH_SECRET=your-secret-key-here-generate-with-openssl-rand-base64-32
NEXTAUTH_URL=http://localhost:3020
# Node Environment
NODE_ENV=production
```
## Génération du secret NextAuth
```bash
openssl rand -base64 32
```
## Développement
Pour le développement, les variables sont définies directement dans `docker-compose.dev.yml`.