@devondahon Well your question is answered in the text you’ve quoted. No, they must have the same top-level domain.
Jan 12, 2021
3
Level 3
Multiple domain names API with Sanctum
Knowing that to use Sanctum, SPA and API must share the same top-level domain, if I set multiple domain names for my api, like api.foo.com, api.bar.com, can I then use Sanctum with different frontends like www.foo.com and www.bar.com, each frontend using its own api guard (and user database) ?
The api and the frontends foo and bar are on three different servers.
In order to authenticate, your SPA and API must share the same top-level domain. However, they may be placed on different subdomains.
Please or to participate in this conversation.