Hi @felipe-dsdev , please check the reference.
data: {
"_token": "{{ csrf_token() }}",
"id": id
}
https://stackoverflow.com/questions/32738763/laravel-csrf-token-mismatch-for-ajax-post-request
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm using Laravel Nova and on login I have the following error: CSRF token mismatch.
On the server side I use the Serverless Framework to deploy on the AWS Lambda Function with provided.al2 runtime, with the bref layer php-8.1-fpm.
For CloudFront I use the serverless-lift library to configure it.
Laravel info:
I've tried everything, I was using cookie as a session driver and I switched to DynamoDB, set the SESSION_DOMAIN variable and nothing seems to work.
Has anyone gone through something similar and can help me?
Hi @felipe-dsdev , please check the reference.
data: {
"_token": "{{ csrf_token() }}",
"id": id
}
https://stackoverflow.com/questions/32738763/laravel-csrf-token-mismatch-for-ajax-post-request
Please or to participate in this conversation.