From 557aadecc02688c224cae383c15e8ed21f2da85c Mon Sep 17 00:00:00 2001 From: tograss <102800033+tograss@users.noreply.github.com> Date: Tue, 16 May 2023 12:28:14 +0200 Subject: [PATCH] stages/authenticator_sms: Fix json serialization in send_generic (#5630) stages/authenticator_sms: Fix SMS Authenticator Setup Stage with generic provider does not work without mapping This fixes issue #5629. Problem is/was that self.get_message(token) in send_generic returned a type django.utils.functional.lazy..__proxy__ which is not json serializable. --- authentik/stages/authenticator_sms/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authentik/stages/authenticator_sms/models.py b/authentik/stages/authenticator_sms/models.py index 9f2e117b4..65e842d55 100644 --- a/authentik/stages/authenticator_sms/models.py +++ b/authentik/stages/authenticator_sms/models.py @@ -99,7 +99,7 @@ class AuthenticatorSMSStage(ConfigurableStage, FriendlyNamedStage, Stage): "From": self.from_number, "To": device.phone_number, "Body": token, - "Message": self.get_message(token), + "Message": str(self.get_message(token)), } if self.mapping: