I've read all available solutions, but no chance. It always redirects to the 403 page with message (Invalid Signature).
Here is my route :
Auth::routes(['verify' => true]);
My env file :
APP_NAME='WebApp'
APP_ENV=local
APP_KEY=base64:V4/NjIiHJMalSGiXqCfzDJJVF4BfDwJ8Hnxr1M8I2Lc=
APP_DEBUG=true
APP_URL=http://127.0.0.1:8000
MAIL_MAILER=log
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"
But the provided link in log file is always invalid.
I'm using built in artisan sever php artisan serve
Update : This is the link in laravel.log
file.
http://127.0.0.1:8000/email/verify/2/52e17b67fd82b0545bb4fbdc5748ed23104133c7?expires=3D1652547054&signature=3De8f38349c57d806fb67170ceee8e7300cbc40d61133e1f70c7929e843401db6a
I have tried php artisan key:generate
and php artisan config:cache
The email is being send by laravel itself, I haven't customized anything.
Also I tried to override verify method provided by VerifiesEmails.php
trait, but no chance. Here is what I did :
VerificationController.php
:
public function verify(Request $request) {
dd($request->fullUrl());
}
I got suspicious to the url according to some solutions but the url is all fine like above mentioned.
For anyone still running into this issue try configuring the TrustProxy
middleware if you have a similar configuration to the below
URL::forceScheme('https');
in the boot
method of AppServiceProvider
To get this working quickly, set the below in TrustProxies.php
middleware.
protected $proxies = '*';
For more information on configuring the $proxies
setting, check out the official Laravel documentation here