Skip to content

Commit

Permalink
fix: extend cookie lifetime
Browse files Browse the repository at this point in the history
Set lifetime of JWT cookie to 24h.
  • Loading branch information
cgawron authored Apr 25, 2024
1 parent 4ee2dcb commit 7cdf808
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ app.get('/callback', async (req, res) => {

const token = tokenSet.id_token;

res.cookie('token', token, { maxAge: 120000, httpOnly: true, secure: true, sameSite: 'none' });
res.cookie('token', token, { maxAge: 86400000, httpOnly: true, secure: true, sameSite: 'none' });
const return_url = req.cookies.return_url || "/";
logger.debug('return_url', return_url);
res.redirect(return_url);
Expand Down

0 comments on commit 7cdf808

Please sign in to comment.