Reputation: 23
I develop multi auth laravel 5.7 application and i works fine in my local env but after deploying it to shared host server and try to login or activate any post request with CSRF token the server return 419 session expire please refresh the page. if i disallow laravel csrf middle-ware it works fine, right now i'm really confused and need any help about this situation or the any information about why laravel will return this error
Upvotes: 1
Views: 2871
Reputation: 2891
You have to define application key (APP_KEY
) before to use laravel application. so run below command for creating new application key
php artisan key:generate
This will generate a key and put it in your env file.
After that delete your config cache and try again
php artisan config:cache
Upvotes: 1