Nov 26, 2016
0
Level 1
Session token doesn't equals form token
When page's loaded, session token is "aaa", form token is "aaa" (for example). When form submits, form token stays "aaa", but session token becomes "bbb". So it calls TokenMismatchException. I checked it by
echo $request->session()->token() . "!=" . $request->input('_token') ?: $request->header('X-CSRF-TOKEN');
More info: in browser i'm looking for such cookies as "laravel_session" and "XSRF_token", but they didn't exist in my app. Cookies storage is empty.
I get this problems only in local machine. Not locally All works fine.
Also when page reloads, a new session file is created.
Session and cache options in ENV file: CACHE_DRIVER=file SESSION_DRIVER=file
Please or to participate in this conversation.