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 1524efcf51
commit d9ece98bbc
1 changed files with 1 additions and 0 deletions

View File

@ -426,6 +426,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,