So I'm using Spark. And I've been using it for days working on my project. No problem.
Today, I power up Homestead, visit my website, try to login and I get: TokenMismatchException in VerifyCsrfToken.php line 67
Just out of the blue.
I get this error on POST /login route, which is defined by Spark and which is defined INSIDE 'web' middleware. I logged in many times before, without issues.
Now, I searched this topic here on forums, on google, even Spark github repository. Tried many solutions I've found, but no help.
What I've tried:
- check if my "login" route uses 'web' middleware
- clearing cache
- generating new key
- putting all of my routes inside 'web' middleware
- checking if _token was send during POST request
- checking the 'login' view for the usage of CSFR which is defined like this {{ csrf_field() }}
- checking if HTML is generated for CSFR
Although, I've noticed inside POST request on 'login' route that these two are different. Maybe they should be? I'm not sure.
// inside request headers
Cookie:XSRF-TOKEN=eyJpdiI6IkZIVUJ2RURlMXhpOThDN3llUWNabFE9PSIsInZhbHVlIjoiQ3hNalZ0Zjh2MnBVSm9HdnpWSzFcL1ZrbVkwNXlZQUVqbGVUd2JGNUNhOTgyZ1ZERjhPQU5Uczdhb2FTQVRQY3U2TXYyZTVVNXplYklZWmdpSnN4U1h3PT0iLCJtYWMiOiJmNGMzZjZhNmI5NjQ1ND ....to be continued
// form data
_token:KFymm26nxRJXiWctbGnZuNwkgioHLr4beYNxfVts
Anyhow, I'm without ideas here. I have no idea what to do!? I would appreciate any help. And P.S. what pisses me the most is the last time it worked fine and now all of the sudden this error show up.