diff --git a/ssoauth/checks.py b/ssoauth/checks.py index 2c100500b6d5671088bf9b5341a823cde52af00f..06c7f37326fc084e8702d8f44756edb0b242407a 100644 --- a/ssoauth/checks.py +++ b/ssoauth/checks.py @@ -124,10 +124,8 @@ def auth_urls_configured(app_configs, **kwargs): @register(Tags.security) def session_lifetime(app_configs, **kwargs): errors = list() - if conf.settings.SESSION_EXPIRE_AT_BROWSER_CLOSE: - return errors max_wanted = 60 * 60 # seconds - if conf.settings.SESSION_COOKIE_AGE > max_wanted: + if conf.settings.SESSION_COOKIE_AGE > max_wanted and not conf.settings.SESSION_EXPIRE_AT_BROWSER_CLOSE: errors.append(Error( "Please reduce SESSION_COOKIE_AGE to at most {max_wanted} or set SESSION_EXPIRE_AT_BROWSER_CLOSE = True".format(**locals()), obj=conf.settings,