diff --git a/authentik/core/models.py b/authentik/core/models.py index 4905e2965..bc3fa43ae 100644 --- a/authentik/core/models.py +++ b/authentik/core/models.py @@ -426,6 +426,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,