简体   繁体   中英

Password reset link in email is not found on server

Am coding for password reset functionality just using the default routes and default functionality. I am able to receive password reset link in mail, but the links is not working. I am getting 404 error that requested url is not found on server.

As of now I am testing on my localhost

Tried different methods, I know that the token provided in the link, can not visibly match with the token in password_reset table. Just do not have a clue to chase this. As I don't want to customize the whole functionality.

Also I have tried before token expriry only.

The basic routes I am using is

Auth::routes(['verify' => true]); \
//Reset Passwords for candidates 
Route::get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request'); 
Route::post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email'); 
Route::get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset'); 
Route::post('password/reset', 'Auth\ResetPasswordController@reset');

APP URL in .env file is APP_URL= http://localhost

I can see the token in password_resets table

What I guess is the token in the mail is different to the token stored in password_resets table, ie the hashed values.

What I expect is that the password reset link should work and I should be able to reset the password.

APP_URL=http://localhost

add port if you are on localhost in APP_URL

An in my case:

APP_URL=http://localhost:8000

转到您的项目文件夹,打开命令行,然后输入php artisan serve然后APP_URL=http://127.0.0.1:8001

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM