From 842fdb0b0c34f496253d4fa8e9fe367b19b04c20 Mon Sep 17 00:00:00 2001 From: Andreas Egli Date: Tue, 11 May 2021 14:57:33 +0200 Subject: [PATCH] fixed session durations of more than 1 day (#863) --- authentik/stages/user_login/stage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authentik/stages/user_login/stage.py b/authentik/stages/user_login/stage.py index 13881d073..5f82e7ac1 100644 --- a/authentik/stages/user_login/stage.py +++ b/authentik/stages/user_login/stage.py @@ -33,7 +33,7 @@ class UserLoginStageView(StageView): backend=backend, ) delta = timedelta_from_string(self.executor.current_stage.session_duration) - if delta.seconds == 0: + if delta.total_seconds() == 0: self.request.session.set_expiry(0) else: self.request.session.set_expiry(delta)