-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: Invalid hash method 'sha256'. #130
Comments
after some googling I found that changing the method from sha256 to scrypt works, so I think sha256 just isn't supported anymore but I'm not 100% sure |
update this line: to this line: |
Thank you WJR1986. It works. |
@WJR1986 Bro you're awesome!! |
Thank you so much @WJR1986 I was struggling to find out the error and I found it by your help! |
My pleasure! Take care ❤️ |
Oh, thank you once again!
…On Mon, 15 Jan 2024 at 20:38, William Richardson ***@***.***> wrote:
Thank you so much @WJR1986 <https://github.com/WJR1986> I was struggling
to find out the error and I found it by your help!
My pleasure! Take care ❤️
—
Reply to this email directly, view it on GitHub
<#130 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BANB3KCJRN6B4NAYD6QRRJDYOVA73AVCNFSM6AAAAAA6WWON3KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJSGM2DQNZRGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
changing sha256 to scrypt worked for me. maybe 'sha256' is not supported with the latest version. |
Legend! Thank you so much! Saved me from stressing out |
This worked thanks |
Worked like a charm |
Thanks @WJR1986 william for your kind support on this issue . It works ..appreciate your effort ..cheers |
My pleasure, buddy. Happy coding ❤️ |
@WJR1986 牛逼 兄弟! |
Thanks buddy, your the best. Was already stressing up about this |
May I ask why did you add 'pbkdf2'? |
|
Thank you for your reply! |
@WJR1986 Thank you so much 😊🙏. You were of great help |
method='pbkdf2:sha256'...use this- 'sha256' is outdated |
One works in this case. |
For some reason whenever I try to hash the password I get this error: ValueError: Invalid hash method 'sha256'. I'm not sure why, as I made sure everything match but just in case here is my code for the auth.py:
from flask import Blueprint, render_template, request, flash, redirect, url_for
from .models import User
from werkzeug.security import generate_password_hash, check_password_hash
from . import db
auth = Blueprint('auth', name)
@auth.route('/login', methods=['GET', 'POST'])
def login():
return render_template("login.html")
@auth.route('/logout')
def logout():
return "
Logout
"@auth.route('/sign-up', methods=['GET', 'POST'])
def sign_up():
if request.method == 'POST':
email = request.form.get('email')
first_name = request.form.get('firstName')
password1 = request.form.get('password1')
password2 = request.form.get('password2')
The text was updated successfully, but these errors were encountered: