Skip to content

Node.js based forum software built for the modern web

fix: bug where loginSeconds setting was ignored for local login

Julian Lamf806befd2fa6
diff --git a/src/controllers/authentication.js b/src/controllers/authentication.js
index a96af6d45f..5d8cc4dff4 100644
--- a/src/controllers/authentication.js
+++ b/src/controllers/authentication.js
@@ -274,7 +274,7 @@ function continueLogin(strategy, req, res, next) {
// Alter user cookie depending on passed-in option
if (req.body.remember === 'on') {
- const duration = 1000 * 60 * 60 * 24 * meta.config.loginDays;
+ const duration = meta.getSessionTTLSeconds() * 1000;
req.session.cookie.maxAge = duration;
req.session.cookie.expires = new Date(Date.now() + duration);
} else {