Multi tenant different login pages for different tenants
We are trying to build a Multi-tenant Mendix application and the Multi-tenancy shall be handled inside mendix as an additional attribute on the Account Entity. But presenty, I am finding it difficult to work on below functionality. Requirement: For each tenant we will give them a custom URl like https://app.mendix.com/login.html?tenantName=tenant1 https://app.mendix.com/login.html?tenantName=tenant2 So now when user with tenant 1 URL logs in, it should show him a Custom Login Page with his Company Branding. (Imagining Login page layout would remain very similar, but some icons and images and branding would differ for each Tenant When tenant 2 user clicks on his URL, it should open his Login Page How can we achieve this? Currently, we have enabled Custom Login Page with Anonymous users. But it is always taking to mendix Login page. We need to dynamically access the URL clicked before the Login Page is rendered and based on parameter in the URL, show different login Pages. We can do this after Login / authentication is done using Custom Login. But in our case we want the login page itself to be different for each Customer / tenant. I have tried using Deeplink module, and also went through the documenation and referred to https://forum.mendix.com/link/space/security/questions/99330 this Forum post as well. But the solution is not working. I dont have a single Custom Login Page. I have multiple Custom login Pages and want to show them dynamically by identifying what is the tenant name in the URL when the URL is entered in the browser. Ifi conifugre a Deeplink microflow, it first needs authentication. Thanks & Regards, Aniketh
All you would need to do is take the tentent info from the url as the input parameter for the deeplink microflow and make sure that based on this data the user is redirected to the correct page. Or even better maybe directed to the same page but with elements like logo’s etc that are set dynamically so that yoou do not need a different page for every tenant.
I do believe that using deeplink is the way forward and you’ll need to see what the issue is in your configuration.
Erwin 't Hoen
The deeplink should work for customized login pages, like Erwin said, but you’re getting in trouble when users logout or when browsers are redirected to the (?) login page when sessions are terminated or the application is restarted.