Flask-Web-App-Tutorial
Flask-Web-App-Tutorial copied to clipboard
ValueError: Invalid hash method 'sha256'.
change to 'scrypt' to work
The problem is due to syntax update of the library used, simply remove/change the method
hashed_password = generate_password_hash(password1, method='pbkdf2:sha256', salt_length=16)
new_user = User(email=email, first_name=first_name, password=hashed_password)
use this snippet
hashed_password = generate_password_hash(password1, method='pbkdf2:sha256', salt_length=16) new_user = User(email=email, first_name=first_name, password=hashed_password)use this snippet
Where am i supposed to put this snippet
hashed_password = generate_password_hash(password1, method='pbkdf2:sha256', salt_length=16) new_user = User(email=email, first_name=first_name, password=hashed_password)use this snippet
Where am i supposed to put this snippet
use it in auth.py file in line 58