修复两步验证中的错误

This commit is contained in:
virusdefender
2015-12-12 21:40:04 +08:00
parent c93d7a5fbc
commit c035971908
3 changed files with 22 additions and 2 deletions

View File

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