cookie lifetime

This commit is contained in:
lukeIam 2023-09-20 18:48:57 +01:00
parent 2c90bba774
commit f6113e85c7

View File

@ -120,14 +120,14 @@ class Auth {
if (req.query.isRest && req.query.isRest.toLowerCase() == "true") { if (req.query.isRest && req.query.isRest.toLowerCase() == "true") {
// store the isRest flag to the is_rest cookie // store the isRest flag to the is_rest cookie
res.cookie('is_rest', req.query.isRest.toLowerCase(), { res.cookie('is_rest', req.query.isRest.toLowerCase(), {
maxAge: 120000 * 120, // Hack - this semms to be in UTC?? maxAge: 120000, // 2 min
httpOnly: true httpOnly: true
}) })
} }
else { else {
// no isRest-flag set -> set is_rest cookie to false // no isRest-flag set -> set is_rest cookie to false
res.cookie('is_rest', "false", { res.cookie('is_rest', "false", {
maxAge: 120000 * 120, // Hack - this semms to be in UTC?? maxAge: 120000, // 2 min
httpOnly: true httpOnly: true
}) })
@ -140,7 +140,7 @@ class Auth {
} }
// store the callback url to the auth_cb cookie // store the callback url to the auth_cb cookie
res.cookie('auth_cb', req.query.callback, { res.cookie('auth_cb', req.query.callback, {
maxAge: 120000 * 120, // Hack - this semms to be in UTC?? maxAge: 120000, // 2 min
httpOnly: true httpOnly: true
}) })
} }