On my password reset page, I save the user’s new password using Security::hash(). When I then try to log in though, my database saved hashed password does not match the version that Auth comes up with when hashing my input in the login field.
I assume this is something like Security::hash() using my application salt to hash the password, whereas Auth doesn’t use that salt?
How do you go about this?
Have you tried the
AuthComponent::password()method instead?Also, if the field is named
password, check that AuthComponent hasn’t already hashed it.Edit: In 3.x, see
DefaultPasswordHasher::hash()instead, as explained in Hashing Passwords.