TokenMismatchException in VerifyCsrfToken.php line 67: - Only one one of several computers.
I've been developing in the same project for a couple of months now, i use my macbook at work and my desktop at home. All has been well until this morning. For some reason i keep getting a token missmatch exception when i try to log in, and this only happens on my desktop, everything works on my macbook. Has anyone ever experienced this before? I have found a couple of posts about token missmatch on line 67 but nothing has been to any help, and since the project actually works on my laptop, i'm really lost. None of my co-workers are having the same issue, it's just me on my desktop where the project used to run flawlessly.
I've cleared cookies, cleared sessions folder, clone the repo in a new folder, cleared all the tables in the database.
The auth-controller is the default artisan make:auth.
The project is laravel 5.2
Start by checking what token/data is being set on the login form and what token/data is being sent by your browser and received by the server after form submit and what token is expected by Laravel.
Are you 100% sure that cookies are allowed? Go into Chrome developer tools and make sure the cookie is being set. In the Resources tab, you can see all the cookies set by the current site.
meta tag name="csrf-token" content="{{ csrf_token() }}" in login page
proper form open with {{ csrf_field() }}
in / out my Route::auth() from web middleware.
change RouteServiceProvider for applying web route default
illuminate/Foundation/http/midlewar/VerifyCsrfToken: check in this file what i got that session token and request are not same in tokensMatch function.
i just lost my all hope , Please help. Thanks.
Yeah i've tried that without success. The weird thing is, i am working on another, also laravel, same version, same default authenticaiton and login. And it works over there.
So every other project works on my desktop, and the project which doesn't work no my desktop runs flawlessly on every other computer we've tried. I've even reinstalled the operating system, still nothing.