Skip to content

Commit

Permalink
Adding TOTP_ISSUER as settings value
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yopiti authored Nov 15, 2023
1 parent a1135bb commit 0b2f693
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions two_factor/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 0b2f693

Please sign in to comment.