I am writing a test that ensures that my reset password function works. The reset password system was created using the php artisan make:auth . To complete the test pass, I need to automate the GET request to /password/reset/{$token} , where $token is the value stored in the password_resets table. Laravel stores the token as follows:
$2y$10$9grKb3c6.Toiv0kjUWbCUeT8Q8D.Fg2gZ/xDLGQUAkmdyHigmRkNW
but when Laravel sends the user a reset password, the reset token looks like this:
382aa64567ecd05a774c2e4ebb199d3340a1424300707053354c749c10487594 .
My GET request to /password/reset/$2y$10$9grKb3c6.Toiv0kjUWbCUeT8Q8D.Fg2gZ/xDLGQUAkmdyHigmRkNW crashes due to a slash in the reset token. (Right after "g2gZ")
I tried to use the decrypt() helper function, but no luck.
How can I convert the reset token that I pull from the password_resets table to match what Laravel sends to the user?
Not sure if this is relevant, but I updated my application from 5.3 to 5.4.
source share