csrf token handling, two jwt tokens
This commit is contained in:
1 parent
f3a356d64b
commit
8b10103ae4
8 files changed
+114
-76
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user