Do you also have the csrf in the header of your application?
<meta name="csrf-token" content="{{ csrf_token() }}">
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I've got a Laravel 5.7 app that is working locally. For instance, when running locally I'll get flash messages about failed validation and it shows fine in the blade view:

I do have the @csrf helper in my blade form.
When I deploy and submit the form on production I get a 419 error: "Sorry, your session has expired. Please refresh and try again". Redirects are not working for social login with google or linkedin in production, though they're working locally.

I am using Laravel Forge for production and database tables for session and cache. So my .env file for production is:
BROADCAST_DRIVER=log
CACHE_DRIVER=database
SESSION_DRIVER=database
QUEUE_DRIVER=sync
I have tried changing the APP_NAME and APP_KEY and deleting all the contents of the "sessions" table as well but the 419 error persists on production.
Then my deployment script for Laravel Forge is:
cd /home/forge/employbl.com
git reset --hard origin/master
git pull origin master
composer install --no-ansi --no-dev --no-interaction --no-progress --no-scripts --optimize-autoloader
echo "" | sudo -S service php7.2-fpm reload
rm -rf node_modules
composer dump-autoload
php artisan config:clear
php artisan view:clear
php artisan responsecache:clear
php artisan config:cache
php artisan migrate --force
php artisan sitemap:generate
How can I clear the sessions so I don't get the 419 "your session has expired" and the form works on the production server?
On your production form I am seeing a token generated but I am also seeing cookie token being generated:
set-cookie: XSRF-TOKEN=eyJpdiI6IllnUTV6QnZpRjZQaGN5dk9ETGFnOVE9PSIsInZhbHVlIjoic2xVZ0MyYTlzODFHamNmZ1A3NGlueVFWWk4xWHpnOHNrZ2VqWVlDMVVYTmtLaWdzZ1RsYnVENFBhSms3QXRVOSIsIm1hYyI6ImIzNTFkZjk2YjViMmViOGVlYTJhNmFhMGFmNzQ2NzRhYTBlOGQ1OWQ5ODNlYWZmYjMxZjZkYTI0MzdlNDY5OWUifQ%3D%3D; expires=Thu, 21-Feb-2019 23:43:24 GMT; Max-Age=7200; path=/
The hidden input token value is completely different.
I'm getting into the weeds on this with my knowledge, but are you somehow setting both a cookie token and db token?
Please or to participate in this conversation.