fix: token samesite=secure

This commit is contained in:
Isaac 2024-04-21 02:03:56 +01:00
parent 409b10b728
commit c6a982e702
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33
2 changed files with 10 additions and 3 deletions

View File

@ -29,9 +29,16 @@ module.exports.get = () => ({
httpOnly: true,
maxAge: data.expires_in,
path: '/',
sameSite: 'Lax',
sameSite: 'Strict',
secure: false,
});
return res.redirect(303, redirect);
res.header('Content-Type', 'text/html');
return res.send(`
<!DOCTYPE html>
<html>
<head><meta http-equiv="refresh" content="0; url='${redirect}'"></head>
<body></body>
</html>
`);
},
});

View File

@ -18,7 +18,7 @@ module.exports.get = fastify => ({
domain,
httpOnly: true,
path: '/',
sameSite: 'Lax',
sameSite: 'Strict',
secure: false,
}).send('The token has been revoked.');
},