Fix jwt-token

This commit is contained in:
2025-09-19 12:49:43 +02:00
parent 155ff8984a
commit 0fa4771a0a

View File

@@ -39,6 +39,10 @@ async function authenticateToken(req, res, next) {
} }
try { try {
if (!process.env.JWT_SECRET) {
throw new Error('JWT_SECRET environment variable is not set');
}
const decoded = jwt.verify(token, process.env.JWT_SECRET); const decoded = jwt.verify(token, process.env.JWT_SECRET);
// Log what's in the token for debugging // Log what's in the token for debugging