fixing check sso

This commit is contained in:
Warunee Tamkoo 2024-12-23 16:16:39 +07:00
parent 28bd3a0a9e
commit e3fc035a07

6
sso.js
View file

@ -85,6 +85,12 @@ app.post("/api/v1/sso/kcauth", async (req, res) => {
const cookies = req.cookies;
const tokenSSO = cookies[cookieName];
if (!tokenSSO) {
res.status(401).send("Unauthorized");
return;
}
const oldssotoken = cookies['oldssotoken'];
if (tokenSSO !== oldssotoken) {