Description
the user instance was created without hashing the password, so when login by the credentials we see No active account found with the given credentials because the system does compare the actual password string with the hashed password which will return a False
Solution
Hashed the user password before saving it
Changes
- Imported and used the
make_password function to hash the user password
- Added a condition to validate the password length before hashing it
Description
the user instance was created without hashing the password, so when login by the credentials we see
No active account found with the given credentialsbecause the system does compare the actual password string with the hashed password which will return a FalseSolution
Hashed the user password before saving it
Changes
make_passwordfunction to hash the user password