core: fix token expiration not being updated upon key rotation

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-08-12 17:22:42 +02:00
parent 9c31ea1aa6
commit 5a7508d2e0
1 changed files with 1 additions and 0 deletions

View File

@ -438,6 +438,7 @@ class Token(ManagedModel, ExpiringModel):
from authentik.events.models import Event, EventAction from authentik.events.models import Event, EventAction
self.key = default_token_key() self.key = default_token_key()
self.expires = default_token_duration()
self.save(*args, **kwargs) self.save(*args, **kwargs)
Event.new( Event.new(
action=EventAction.SECRET_ROTATE, action=EventAction.SECRET_ROTATE,