From 6eef5eb59c3381533ac52db70c13bbe3a11678d5 Mon Sep 17 00:00:00 2001 From: Stefan Ubbink Date: Mon, 13 Mar 2023 18:54:49 +0100 Subject: [PATCH] Make the OTP label the same as the site_name #1237 --- powerdnsadmin/models/user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/powerdnsadmin/models/user.py b/powerdnsadmin/models/user.py index 78104f6..8616769 100644 --- a/powerdnsadmin/models/user.py +++ b/powerdnsadmin/models/user.py @@ -90,8 +90,8 @@ class User(db.Model): return ''.format(self.username) def get_totp_uri(self): - return "otpauth://totp/PowerDNS-Admin:{0}?secret={1}&issuer=PowerDNS-Admin".format( - self.username, self.otp_secret) + return "otpauth://totp/{0}:{1}?secret={2}&issuer=PowerDNS-Admin".format( + Setting().get('site_name'), self.username, self.otp_secret) def verify_totp(self, token): totp = pyotp.TOTP(self.otp_secret)