-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Password Reset not working #79
Comments
Thanks! |
brandtam did this commit fix it for you? |
And I did run composer update beforehand :-D |
Brandtam re run php artisan confide:routes he added two routes to the restful controller that fixes it. But I no long get this error now I just get invalid password everytime I try to change the password |
Thanks cie101 that did fix the routes. After I deleted the user controller and recreated it using -restful... However, now I'm stuck where you are with the password not being accepted. I looked in the confide controller and I can confirm that the $input array is making it through with the token, the password and the password confirmation fields. But it looks like the method is just not doing the right thing with the passwords. I think a new issue should be opened at this point. |
Password reset still doesn't work. Next step |
In regards the the routes that were added it breaks the the confirm password link. Once you create a user and get the email saying click link to confirm the user get the screenshot that brandtam posted above. I removed those routes from my routes.php and in the UserController.php in the postReset() method i created a $token variable and told it to also get the token input. Then i went ahead and in the line where it says $return Redirect::to('user/reset') i changed that to Redirect::to('user/reset/' . $token) and that fixed the issue of the confirmation link not working. |
@cie101, are you using the password reset link that was sent to the user email? The password reset link should look like the following: http://localhost:3000/user/reset_password/334f1f52c23f425aa1040f60aa0d3e77 The last parameter is the Are you sure that the link in the email was absent of the token? |
@Zizaco the link shows the token, but when it was erroring before that it gave the screenshot before it would redirect you to /user/reset, but it would not include the token. Lets say that a password tried to get reset now and it failed validation it would get a redirect to /user/reset without the token. The only way it passed the token is by using the routes that @andrew13 added or by including it in the controller like i did. The only issue i have with the routes that were added to the routes.php is that when you create a user and click on the generated link for whatever reason it errors out with the same error as the screenshot above. Thats when i added it in the controller and it is all working now. I don't know if maybe someone else can reproduce the issue with the routes that @andrew13 added to the routes.php to confirm. |
Does this #87 solves your problem? There was an error in RESTful routes, are you using a generated RESTful controller? |
@Zizaco 87 solved the original issue i am now able to reset the password and all is good, but when you click on the link once you get the confirm email it just takes you to the same error thats in the screenshot above. Let me try to reproduce the issue again. I am going to remove the token variable that i put in the controller and put back the routes that @andrew13 added. I am using RESTful controller. and the Restful routes. |
I think what is happening is if the reset token fails. The redirect is incorrect. No token is passed on the redirect. From controller.blade.php, function do_reset_password or postReset else
{
$error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');
@if (! $restful)
return Redirect::action('{{ $name }}@reset_password', array('token'=>$input['token']))
@else
return Redirect::to('user/reset/'.$input['token'])
@endif
->withInput()
->with( 'error', $error_msg );
} |
I'm not sure if this is related to L4 update today (because I didn't try it before today) but when I try and use the Forgot Password link it sends the email just fine but when I use the link that is emailed to me to reset the password there is a problem. It looks like the token isn't making it into the controller. Here is a screenie.
The text was updated successfully, but these errors were encountered: