csrf token handling, two jwt tokens

This commit is contained in:
jackiettran
2025-11-26 14:25:49 -05:00
parent f3a356d64b
commit 8b10103ae4
8 changed files with 114 additions and 76 deletions

View File

@@ -38,8 +38,8 @@ const authenticateSocket = async (socket, next) => {
return next(new Error("Authentication required"));
}
// Verify JWT
const decoded = jwt.verify(token, process.env.JWT_SECRET);
// Verify JWT (access tokens only)
const decoded = jwt.verify(token, process.env.JWT_ACCESS_SECRET);
const userId = decoded.id;
if (!userId) {