Multi Tenancy Subdomain Issue
I'm using Filament v4 with subdomain tenancy.
->tenant(Organization::class, slugAttribute: 'slug')
->tenantDomain('{tenant:slug}.my-application.test')
When I use the built-in tenant switcher, it doesn't correctly force the full browser redirect to the new subdomain structure.
6 Replies
Can you explain what currectly and fully means? Give scenarios of issues
@toeknee
I have 10 tenants/organizations.
As a super admin, I log in to organization-1.myapplication.test/admin. Within the tenant/organization switcher, I can switch to other organizations as well.
However, when I try to switch to Organization 2, it throws a 404 error. This happens because the URL redirection is incorrect — instead of redirecting to organization-2.myapplication.test/admin, it redirects to myapplication.test/admin/organization-2, which is the default behavior.
That's why, you are mixing between the two. I suspect you have multiple panels if one is a subdomain and one isn't?
orgnaisation-1 should be on a subdomain: admin for instance.
https://filamentphp.com/docs/4.x/users/tenancy#using-a-domain-to-identify-the-tenant
actually i'm Referencing to above subdomain routing method - and its an single panel for all the tenants.
up
If everything works, maybe there's a bug with the tenant switcher. Can you file an issue on GitHub?