Laraexp
Laraexp

Reputation: 1

Why doesn't native Laravel 5.4 authentication send to password reset page?

I made a basic project in Laravel 5.4 using PhpStorm and executed php artisan make:auth and php artisan migrate. After running php artisan serve, I accessed the resulting site on http://localhost:8000 and tested the password recovery. Using Gmail for SMTP, the corresponding user received an e-mail with a link like this:

http://localhost/password/reset/d55b8591a690c96742e192d31ba6b1c7b06cb4b390fa08baaf02ce261618b884

It redirects me to a 404 Error page.

Looking at php artisan route:list, there is a route called "password.reset", set on GET|HEAD with the following URI: password/reset/{token}. So it seams that should work, since there is a place for a token. The action is: App\Http\Controllers\Auth\ResetPasswordController@showResetForm

There's basically nothing on that controller, but it has use ResetsPassword from Illuminate\Foundation\Auth inside the class. When I try to overwrite the function, I look at the original and it does redirect to reset password view.

But something is not working. I tried to add :8000 to the link, but it just redirects me to a blank page and I'm sure the server is still serving at that port. What am I doing wrong?

Upvotes: 0

Views: 235

Answers (2)

MingyarAcosta
MingyarAcosta

Reputation: 11

You have to change APP_URL=http://localhost to APP_URL=http://localhost:8000 in the .env

Upvotes: 1

Franco Tume Fiestas
Franco Tume Fiestas

Reputation: 46

Your route in the email must have the ":8000" that is the port of your application. Your browser if looking for the same route but in just in the localhost route without a port

Upvotes: 0

Related Questions