Im building a system with two domains (sub1.domain.com and sub2.domain.com). These two domains use the exact same system. The only reason i use two domains is because of the name to make things more clear for the users.
On sub1.domain.com everything works fine, but on sub2.domain.com i get a CSRF TokenMismatch error.
I've tried to implement CORS in two different ways, making my own middleware and using a standard composer package for laravel. Those two solutions do not seem to work.
I also tried to define a domain in config/session.php
. (sub-domains and top-level domain). But when i tried that, the whole login stopped working and i was redirected back to the login page without a message. (I did received a error message when used wrong credentials)
Some ideas?
Thanks in advance!