Fix jwt-token
This commit is contained in:
@@ -39,6 +39,10 @@ async function authenticateToken(req, res, next) {
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
// Log what's in the token for debugging
|
||||
|
||||
Reference in New Issue
Block a user