From 5a7508d2e0d5d3af89f6067af9310860a251d998 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 12 Aug 2021 17:22:42 +0200 Subject: [PATCH] core: fix token expiration not being updated upon key rotation Signed-off-by: Jens Langhammer --- authentik/core/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/authentik/core/models.py b/authentik/core/models.py index 03eb5cf21..bbc4ae71f 100644 --- a/authentik/core/models.py +++ b/authentik/core/models.py @@ -438,6 +438,7 @@ class Token(ManagedModel, ExpiringModel): from authentik.events.models import Event, EventAction self.key = default_token_key() + self.expires = default_token_duration() self.save(*args, **kwargs) Event.new( action=EventAction.SECRET_ROTATE,