francescomalatesta / laravel-api-boilerplate-jwt

A Laravel 5.8 API Boilerplate to create a ready-to-use REST API in seconds.
MIT License
1.17k stars 285 forks source link

Reset Password Fails #84

Open aidataguy opened 5 years ago

aidataguy commented 5 years ago

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.. .

admsvist commented 5 years ago

I have the same problem

francescomalatesta commented 5 years ago

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 :)

michaelcerne commented 4 years ago

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.

defelper commented 3 years ago

I found that in ResetPasswordController

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

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