One of our customers wants that tenant is automatically selected when a user comes to login page (because all application is "inside" tenant and not host). Users should not be aware of tenant, because they are confused. However, this customer currently does not have any options that we could "solve" this issue by URL tenant resolving ({TENANCY_NAME}).
Is somehow possible, that one tenant is selected by default (for instance "Default" tenant or any other) and if administrator wants to enter in host, he would change this on login page explicitly (write empty string in modal window on login page when changing tenant)?
Thank you.
7 Answer(s)
-
0
Hi, automatically tenant selection is not recommended in general. For example, show the automatically selected tenant A information to a user from tenant B might even be more confusing.
-
0
I agree, but for testing environment, we (our customer) does not have option for URL tenant subdomains. This is LOCAL INSTALLATION and only one tenant is defined (in use). There will be different in production (tenant subdomains).
-
0
Hi, one possible solution is to add tenant name as query param to the application url in testing environmen. Then, implements auto tenant selection via query param in your application.
In this case, test user will always land on tenant login page.
-
0
Crap! :( I would also need host.
-
0
The approach mentioned above only auto fill the tenant name when you landed on the login page.
You can always empty the tenant name to login as host
-
0
@ryancyq's suggestion is good. In that case, you can share two URLs with your customer.
mywebsite.com?tenant=default (for tenant) mywebsite.com (for host)
-
0
Thank you. :) It works. Just two minor code additions in root-routing.module.ts and login.component.ts.
I think that ANZ should have option resolving tenant based on URL parameters (not just via subdomains). Not all customers have abilities to provide such infrastructure.