Monday, 27 September 2021

check_password not verifying database stored password successfully

I am using Python 3.9.7 and DJango 3.2.7

Issue details

Following code is being used to verify the submitted password.

I can confirm that the submitted password has a valid value and user.password is hashed password stored in the database.

passwordCheckResult = check_password(request.POST.get("password"), user.password)
print(passwordCheckResult)

Why does it always return False?

What did I search so far

Django check_password() always returning False but this is not fixing my issue

I was wondering why the below code works and not above one...

hashed = make_password("123")
check_password("123", hashed) //this returns True


from check_password not verifying database stored password successfully

No comments:

Post a Comment