fbc
1 week ago
122
5
Laravel

Emailed password reset link does not work

Posted 1 week ago by fbc

These are what my routes look like.

It seems that the link is never hitting the first route with the {token}. It seems to use the second route no matter what. I can comment out the first route and it exhibits the exact same behavior. It just goes back to the Password Reset Request Form.

It's just caught in a loop. It behaves like 'password/reset/{token}' did not exist and ignoring it.

// Password Reset Routes...
Route::get('password/reset/{token}', ['as' => 'password.reset.token', 'uses' => 'Auth\[email protected]']);
Route::get('password/reset', ['as' => 'password.reset', 'uses' => 'Auth\[email protected]']);
//Route::post('password/email', ['as' => 'password.email', function(){abort(499, 'Function not enabled.');}]);
Route::post('password/email', ['as' => 'password.email', 'uses' => 'Auth\[email protected]']);
Route::post('password/reset', ['as' => 'password.reset.post', 'uses' => 'Auth\[email protected]']);
|        | POST      | password/email                               | password.email             | App\Http\Controllers\Auth\[email protected]  | web,guest                                            |
|        | GET|HEAD  | password/reset                               | password.reset             | App\Http\Controllers\Auth\[email protected] | web,guest                                            |
|        | POST      | password/reset                               | password.reset.post        | App\Http\Controllers\Auth\[email protected]                | web,guest                                            |
|        | GET|HEAD  | password/reset/{token}                       | password.reset.token       | App\Http\Controllers\Auth\[email protected]        | web,guest      

my NGINX directive looks like this:

location / {
  try_files /public/$uri /public/$uri/ /public/index.php?$query_string;
}

the link is formed as:

https://app.domain.com/password/reset?token=4a944e8bbdf520ecb2ce6def58d21d6dde730a30a0ce22c99183921942474eec&email=john.doe%40gmail.com

Please sign in or create an account to participate in this conversation.