mirror of
https://github.com/TrentSPalmer/todo_app_flask.git
synced 2025-07-01 02:13:10 -07:00
update totp.py handle pyotp.random_base32() now outputs 32 char string
that won't fit into existing 16char type in the existing app database
This commit is contained in:
parent
0dde8781ec
commit
b81c6c9fa3
@ -8,7 +8,7 @@ from io import BytesIO
|
||||
|
||||
|
||||
def get_totp_qr(contributor, app_config):
|
||||
totp_key = pyotp.random_base32() if contributor.totp_key is None else contributor.totp_key
|
||||
totp_key = pyotp.random_base32()[:16] if contributor.totp_key is None else contributor.totp_key
|
||||
if contributor.totp_key is None:
|
||||
conn = psycopg2.connect(
|
||||
dbname=app_config['DATABASE_NAME'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user