Skip to content

Commit

Permalink
fix jazzband#309 add get_issuer
Browse files Browse the repository at this point in the history
  • Loading branch information
Sloman authored and Sloman committed Jun 27, 2019
1 parent 2e8f035 commit bcc1d1f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion two_factor/views/core.py
Expand Up @@ -538,6 +538,9 @@ class QRGeneratorView(View):
'SVG': 'image/svg+xml; charset=utf-8',
}

def get_issuer(self):
return get_current_site(self.request).name

def get(self, request, *args, **kwargs):
# Get the data from the session
try:
Expand All @@ -555,7 +558,7 @@ def get(self, request, *args, **kwargs):
username = self.request.user.username

otpauth_url = get_otpauth_url(accountname=username,
issuer=get_current_site(self.request).name,
issuer=self.get_issuer(),
secret=key,
digits=totp_digits())

Expand Down

0 comments on commit bcc1d1f

Please sign in to comment.