I have an application which uses AJAX quite a bit on a Laravel 5.3 application. I have some pages that are behind authentication and some that are not. The ones that are inside of authentication are working fine. The one that is outside (public facing) are giving me a the infamous
TokenMismatchException in VerifyCsrfToken.php line 68
And, I finally figured it out. I am using BrowserSync for livereload, which proxies all my requests to
localhost:3000/*. When I was testing the public side, I was visiting it through the original domain name and not proxied through browsersync's
localhost:3000 so that was causing session issues.
Basically, if you have BrowserSync running and you try in use your site not through browsersync, you can get token mismatch errors.