I've a problem with Laravel Sanctum, I've been googling for almost 1 week and have not found the solution, I use Sanctum with hyn/multi-tenant, I don't use SPA authentication but API Token authentication. The tenant authenticates well and generates the token, but for some reason does not access the routes protected by the auth:sanctum middleware, this only happen with tenant users, the token is lost or not passed, redirect to login.
I don't think the problem is tenancy package, I think is something with sanctum, because with main domain work fine, but with subdomains middleware sanctum not work, because lose API token Authorization.
I've defined too SANCTUM_STATEFUL_DOMAINS and SESSION_DOMAIN and doesn't work, I also pass the X-XSRF-TOKEN and it doesn't work either
This is my SANCTUM_STATEFUL_DOMAINS=new-api.test
and SESSION_DOMAIN=.new-api.test
SANCTUM_STATEFUL_DOMAINS
variable .? – Kamlesh Paul