We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
on extension to #452
1)Want to manually extend session - if user wants to 2)have set rolling to false 3)before expiration updated maxage
extendSession: (req, res) => { if (!req.session) { return res.sendStatus(401); // Unauthorized } const sessionExtension = 1000 * 60 * 3; logger.debug('Before extension:', req.session.cookie); req.session.cookie.maxAge = sessionExtension; req.session.touch(); req.session.save(err => { if (err) { console.log("error in extension", err); return res.status(500).send('Error extending session.'); }
const newExpiry = req.session.cookie.expires ? req.session.cookie.expires.getTime() : Date.now() + sessionExtension; logger.debug('After extension:', req.session.cookie); res.json({ message: 'Session extended by 24 hours.', newExpiry }); }); },
Still not able to get set-cookie response in the header
The text was updated successfully, but these errors were encountered:
No branches or pull requests
on extension to #452
1)Want to manually extend session - if user wants to
2)have set rolling to false
3)before expiration updated maxage
extendSession: (req, res) => {
if (!req.session) {
return res.sendStatus(401); // Unauthorized
}
const sessionExtension = 1000 * 60 * 3;
logger.debug('Before extension:', req.session.cookie);
req.session.cookie.maxAge = sessionExtension;
req.session.touch();
req.session.save(err => {
if (err) {
console.log("error in extension", err);
return res.status(500).send('Error extending session.');
}
Still not able to get set-cookie response in the header
The text was updated successfully, but these errors were encountered: