i am upgrading my raw php website to laravel 7. all my users have their passwords stored in md5 encryption. now when i try to login any of those user account with correct password, it returns error with 'These credentials do not match our records.'. How can i check if my users have entered md5 password and update their password ? can someone help me with this?
Asked
Active
Viewed 155 times
-3
-
Does this answer your question? [How can I use MD5 hashing for passwords in Laravel?](https://stackoverflow.com/questions/33562285/how-can-i-use-md5-hashing-for-passwords-in-laravel) – miken32 Dec 14 '20 at 22:24
1 Answers
1
Yes, that is correct, Laravel uses different encryption for passwords.
Hash::make($password)
here the one they use
https://en.wikipedia.org/wiki/Bcrypt
The best way to do that is to ask your users to set a new password.
Other dirty way would be to have a column with those old md5 passwords and check it in AuthController if correct, then create the new password using the reques parameter and tick in somewhere password_updated=1 or something like that.

Ezequiel Fernandez
- 954
- 11
- 18