From f806befd2fa69324644144516e66813268c680f4 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 3 Mar 2021 16:04:36 -0500 Subject: [PATCH] fix: bug where loginSeconds setting was ignored for local login --- src/controllers/authentication.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {