stancl/tenancy main domain issue

Hi there, I've installed stancl tenancy package, I followed its docs and this https://filamentphp.com/docs/2.x/admin/resources/getting-started#multi-tenancy, when I go to the main domain localhost/admin/(register or login) I get this error : Stancl \ Tenancy \ Exceptions \ TenantCouldNotBeIdentifiedOnDomainException Tenant could not be identified on domain localhost NB: I can login to a tenant sub-domain If I create a tenant + domain manually, (ex foo.localhost/admin/login) Please anyone has used it ? what am I missing ?
5 Replies
Dennis Koch
Dennis Koch2y ago
As you stated: It works with a subdomain. It cannot identify a tenant on the main domain, as there is no data for it.
BKF Dev
BKF DevOP2y ago
Thanks for quick reply, so if I understood, I must create the main domain with its tenant ? But I've used this package without filament and I'm able to login/register the main domain without any issue
Dennis Koch
Dennis Koch2y ago
Sorry, I haven’t used that package. Just trying to make sense of your exception. There is probably a middleware or similar that tried to register a tenant on your main domain.
BKF Dev
BKF DevOP2y ago
Never mind, I found the mistake, I should add 'universal' middleware in filament config under base, and it works fine 🙂 @danharrin you may add this here : https://filamentphp.com/docs/2.x/admin/resources/getting-started#multi-tenancy
Sander
Sander2y ago
Thanks for this
Want results from more Discord servers?
Add your server