5

I've added Laravel Nova to my Laravel app (v7.x). There is nothing special configured within my middlewares/service providers/etc.

Whenever I submit a form from Nova, it results in a 419 Page expired error.

The VerifyCsrfTokenMiddleware throws an error, saying there is a "CSRF token missmatch".

All views and assets are default as they came by the Laravel Nova installation script.

Any idea, what causes this problem?

Brotzka
  • 2,959
  • 4
  • 35
  • 56

1 Answers1

1

I recently faced the same problem. I resolved it by adding the following line to my .env file:

SESSION_DOMAIN=.domain.tld

Where domain.tld is your domain obviously. Don't forget the initial dot.

Also, if you're using Laravel passport and your site is fresh, don't forget to execute php artisan passport:install

stressed out
  • 522
  • 6
  • 24