tfa 显示 url

This commit is contained in:
virusdefender 2015-12-12 21:26:09 +08:00
parent e53f625ae3
commit c93d7a5fbc

View File

@ -411,7 +411,7 @@ class TwoFactorAuthAPIView(APIView):
user.tfa_token = token
user.save()
image = qrcode.make(OtpAuth(token).to_uri("totp", "OnlineJudge", "OnlineJudge"))
image = qrcode.make(OtpAuth(token).to_uri("totp", "OnlineJudgeAdmin", settings.WEBSITE_INFO["url"]))
buf = StringIO.StringIO()
image.save(buf, 'gif')