From 6db1c914ee3170061fa6ead9062f65a435bbc543 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 11 Nov 2021 22:16:47 +0100 Subject: [PATCH] stages/authenticator_duo: fix devices created with name Signed-off-by: Jens Langhammer --- authentik/stages/authenticator_duo/stage.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/authentik/stages/authenticator_duo/stage.py b/authentik/stages/authenticator_duo/stage.py index bd94fad85..a3a66eae2 100644 --- a/authentik/stages/authenticator_duo/stage.py +++ b/authentik/stages/authenticator_duo/stage.py @@ -84,7 +84,9 @@ class AuthenticatorDuoStageView(ChallengeStageView): self.request.session.pop(SESSION_KEY_DUO_USER_ID) self.request.session.pop(SESSION_KEY_DUO_ACTIVATION_CODE) if not existing_device: - DuoDevice.objects.create(user=self.get_pending_user(), duo_user_id=user_id, stage=stage) + DuoDevice.objects.create( + name="Duo Device", user=self.get_pending_user(), duo_user_id=user_id, stage=stage + ) else: return self.executor.stage_invalid("Device with Credential ID already exists.") return self.executor.stage_ok()