Common Issues
Login fails with correct credentials 401: {"message":"Unauthenticated."}
Most likely you didnt set the SANCTUM_STATEFUL_DOMAINS in the env file, it's incorrect or the current domain is missing. If you run Spacialist on localhost:8000 and ThesauRex on localhost:8001 and your .env file has:
SANCTUM_STATEFUL_DOMAINS=localhost:8000
You must add Thesaurex to that config, also make sure that you set the SESSION_DOMAIN correctly:
SANCTUM_STATEFUL_DOMAINS=localhost:8000,localhost:8001
SESSION_DOMAIN=localhost # You can only define one domain here.
Caution
When you have SESSION_DOMAIN set to localhost and you access site using 127.0.0.1:8001
you may get the error, as this domain is not supported, only localhost is.