0

I'm sorry guys to post again this issue that seems impacting everyone who use Laravel.

I did / changed everything I had to change to avoid this error, but sometimes not always I got

"TokenMismatchException"

Does anyone know why or have an explication please? Cause I feel like I lose a lot of time trying to fix this sh***** issue....

thanks a lot

Amaury Leproux
  • 229
  • 1
  • 5
  • 21
  • The exact approach you need to take depends on whether you're using a `
    `, AJAX, or if these are something like a server-to-server API request. The duplicate thread has various answers that deal with each of these. Fundamentally, you've got a `POST` route you're either a) not sending a CSRF token to or b) sending the *wrong* token to. https://laravel.com/docs/5.4/csrf
    – ceejayoz Apr 26 '18 at 12:37
  • (Side note: Think very carefully before you do one of the "just disable it" answers. CSRF protection is a **good thing**. Understand what it is, and what it protects you from, before you go turning it off.) – ceejayoz Apr 26 '18 at 12:38
  • thanks, I don't want to turn it off, but since I began I might spent 2 complete days trying to make it work again cause I didn't change anything yesterday and I was properly working :/ anayway thank you for your time – Amaury Leproux Apr 26 '18 at 12:40
  • If it was previously working, and you haven't changed anything, I'd check that your Laravel app is saving sessions properly. The user's token is stored in one. – ceejayoz Apr 26 '18 at 12:41

0 Answers0