apply security audit

This commit is contained in:
Matthias Hochmeister
2026-03-11 13:51:01 +01:00
parent 93a87a7ae9
commit 3c9b7d3446
19 changed files with 247 additions and 341 deletions

View File

@@ -1,6 +1,6 @@
import { Router } from 'express';
import authController from '../controllers/auth.controller';
import { optionalAuth } from '../middleware/auth.middleware';
import { authenticate } from '../middleware/auth.middleware';
const router = Router();
@@ -14,9 +14,9 @@ router.post('/callback', authController.handleCallback);
/**
* @route POST /api/auth/logout
* @desc Logout user
* @access Public (optional auth for logging purposes)
* @access Private
*/
router.post('/logout', optionalAuth, authController.handleLogout);
router.post('/logout', authenticate, authController.handleLogout);
/**
* @route POST /api/auth/refresh