Skip to content
Advertisement

Laravel 9 email verification Invalid Signature

I’ve read all available solutions, but no chance. It always redirects to the 403 page with message (Invalid Signature).

Here is my route :

JavaScript

My env file :

JavaScript

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.

JavaScript

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 :

JavaScript

I got suspicious to the url according to some solutions but the url is all fine like above mentioned.

Advertisement

Answer

After struggling 9 hours with this and hitting my head against the wall; finally I found out that the SIGNATURE is fine, but when laravel logs it in laravel.log file, it corrupts the file content and prefixes the SIGNATURE with this 2 characters 3D.

This way everything breaks; I don’t know why is this happening.

I won’t delete this question in case others face this problem in future.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement