From 0b2f693f0ca1b8d5a6d375f4d1e6f3184a5e8750 Mon Sep 17 00:00:00 2001 From: yopiti Date: Wed, 15 Nov 2023 22:55:04 +0100 Subject: [PATCH] Adding TOTP_ISSUER as settings value Using the site name at this point doesn't always make sense. This gives you the possibility to set TOTP_ISSUER in the settings.py file and show this information in the TOTP app. --- two_factor/views/core.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/two_factor/views/core.py b/two_factor/views/core.py index d37ea19f4..2dea603a7 100644 --- a/two_factor/views/core.py +++ b/two_factor/views/core.py @@ -707,6 +707,8 @@ class QRGeneratorView(View): } def get_issuer(self): + if settings.TOTP_ISSUER: + return settings.TOTP_ISSUER return get_current_site(self.request).name def get_username(self):