IO-2776 Remove issue checking revoked token causing log issues on wss.
This commit is contained in:
@@ -36,7 +36,7 @@ const redisSocketEvents = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const user = await admin.auth().verifyIdToken(token, true);
|
const user = await admin.auth().verifyIdToken(token);
|
||||||
socket.user = user;
|
socket.user = user;
|
||||||
socket.bodyshopId = bodyshopId;
|
socket.bodyshopId = bodyshopId;
|
||||||
socket.data = socket.data || {};
|
socket.data = socket.data || {};
|
||||||
@@ -64,7 +64,7 @@ const redisSocketEvents = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const user = await admin.auth().verifyIdToken(token, true);
|
const user = await admin.auth().verifyIdToken(token);
|
||||||
if (currentTimestamp < latestTokenTimestamp) {
|
if (currentTimestamp < latestTokenTimestamp) {
|
||||||
createLogEvent(socket, "warn", "Outdated token validation skipped.");
|
createLogEvent(socket, "warn", "Outdated token validation skipped.");
|
||||||
return;
|
return;
|
||||||
@@ -79,7 +79,6 @@ const redisSocketEvents = ({
|
|||||||
socket.handshake.auth.token = token;
|
socket.handshake.auth.token = token;
|
||||||
socket.handshake.auth.bodyshopId = bodyshopId;
|
socket.handshake.auth.bodyshopId = bodyshopId;
|
||||||
}
|
}
|
||||||
|
|
||||||
await refreshUserSocketTTL(user.email, bodyshopId);
|
await refreshUserSocketTTL(user.email, bodyshopId);
|
||||||
socket.emit("token-updated", { success: true });
|
socket.emit("token-updated", { success: true });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user