I have a form which includes {{ csrf_field() }}
When I submit the form in Firefox (v57.0.4) it works fine no issues.
When I submit the same form in Chrome (v63.0.3239.132) i keep getting:
TokenMismatchException in VerifyCsrfToken.php line 67
I've tried to clear cookies/browser cache and it makes no difference. I've looked at the following post ("The page has expired due to inactivity" - Laravel 5.5) but my issue is related to Chrome only as it works fine in Firefox.
In my env file I have the following set:
SESSION_DRIVER=file
* UPDATE *
What I have noticed is that when I submit the form in Chrome, a new session file seem to be generated each time inside storage\framework\sessions
. In fact every time I refresh the page or go to another page a new session file is being generated?
Another thing I've noticed is that if I login to my application in Chrome without checking the remember me
checkbox it seems to work fine, but if I login with the remember me
checkbox selected, I get the above behavior.
So I've narrowed it down to the remember token which is causing the above issue.
Whilst in Firefox everything seems to work fine. This is really weird.
Note I'm running wamp on windows 10 - looking through the following post suggest its a wamp thing: (https://laracasts.com/discuss/channels/laravel/laravel-not-reading-session-cookie-on-form-post-in-chrome-when-logged-in-with-remember-me)
Anyone got any other tips to fix?