Merge pull request #397 from rkerr/master

Fix for when TOTP starts with 0
This commit is contained in:
Khanh Ngo 2018-11-19 09:23:45 +07:00 committed by GitHub
commit a1245dcded
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,7 +90,7 @@ class User(db.Model):
def verify_totp(self, token):
totp = pyotp.TOTP(self.otp_secret)
return totp.verify(int(token))
return totp.verify(token)
def get_hashed_password(self, plain_text_password=None):
# Hash a password for the first time