Send cookie on token upgrade

This commit is contained in:
KernelDeimos 2024-04-11 21:40:10 -04:00
parent bb9edc4f65
commit 2d76025c9c

View File

@ -97,6 +97,12 @@ const auth2 = async (req, res, next) => {
req.token = new_info.token;
req.user = new_info.user;
req.actor = new_info.actor;
res.cookie(config.cookie_name, new_info.token, {
sameSite: 'none',
secure: true,
httpOnly: true,
});
next();
return;
}