Q: laravel's self-contained auth verification only supports password retrieval (sending emails and resetting passwords). now I want to change the password on my own, that's how to change the old password into a new password. In fact, I also know this logic. I only got stuck in one step: the password that comes with auth... q: laravel's self-contained auth verification only supports password retrieval (sending emails and resetting passwords). now I want to change the password on my own, that's how to change the old password into a new password. In fact, I also know this logic. I only got stuck in one step: How did I verify the self-built password encryption of auth? My use:
Bcrypt (input ('Old _ password') = old_password
But always false. what should I do? .
Reply content:
Q: laravel's self-contained auth verification only supports password retrieval (sending emails and resetting passwords). now I want to change the password on my own, that's how to change the old password into a new password. In fact, I also know this logic. I only got stuck in one step: How did I verify the self-built password encryption of auth? My use:
Bcrypt (input ('Old _ password') = old_password
But always false. what should I do? .
Your problem:Auth
How is the built-in password encryption verified?
Answer:\ Hash: check (\ Request: input ('Old _ password'), $ old_password)
(Where$ Old_password
Is the old hash password obtained from the database)
Link to related documents: Hashing
Use the same plaintext passwordBcrypt
The hash password generated by the function is different, because each time you use a differentSalt