laravel-api-boilerplate-jwt icon indicating copy to clipboard operation
laravel-api-boilerplate-jwt copied to clipboard

Reset Password Fails

Open aidataguy opened this issue 5 years ago • 4 comments

Hi everyone....

I am facing the an issue when I am trying to do a password reset. I am passing the required parameters in postman body. Upon tracing, I have found that when API is called in response it gets password.passwords instead of getting password.reset. and at the end hits throw new HttpException(500); . I am following all the steps but it seems that something is missing would really appreciate any help on this one.. .

aidataguy avatar Jul 10 '19 09:07 aidataguy

I have the same problem

admsvist avatar Jul 12 '19 09:07 admsvist

There are some tests here you can use as hints: https://github.com/francescomalatesta/laravel-api-boilerplate-jwt/blob/master/tests/Functional/Api/V1/Controllers/ResetPasswordControllerTest.php

Right now functional tests for this feature are working the right way :)

francescomalatesta avatar Jul 28 '19 09:07 francescomalatesta

For future readers: As per the Laravel default password validator, the password must be a minimum of 6 characters (unless overridden).

Enforcing this minimum resolved the error in my case.

michaelcerne avatar Nov 29 '19 03:11 michaelcerne

I found that in ResetPasswordController

if($response !== Password::PASSWORD_RESET) { throw new HttpException(500); }

$response = passwords.password Password::PASSWORD_RESET = passwords.reset

defelper avatar Apr 11 '21 02:04 defelper