XSRF-TOKEN not generating in laravel api with next.js app

401 Views Asked by At

XSRF-TOKEN not generating in laravel API with next.js app in live server. but everything is working fine on localhost. I am using Laravel as the backend and next.js as the frontend.

Localhost Image

enter image description here

1

There are 1 best solutions below

2
On

I think you forgot to generate APP_KEY on your production environment, check .env file and in case APP_KEY is empty try to call php artisan key:generate command.