Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

How to keep multi-tenants but not specify tenant on login. #977


User avatar
0
choochoo created

I am curious as to why the users have to specify the username, password AND tenant? Can't the system just know what Tenant they below to based on tenant id of the user logging in?

Thanks!


6 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    What if there are 2 users in different tenants but with same username. In that case, how you will know which user to get?

  • User Avatar
    0
    choochoo created

    Yeah I understand, it is a nice feature, but in my case the users are even burdened by entering a UN/PW so an additional tenancy name will blow their minds.

    Will the underlying architecture need an overhaul or is it simpler then that?

  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    If you disable multi-tenancy, then no need to tenant name. If you want multi-tenancy, you should ensure username/email uniqueness for all system (across tenants) to not get tenancy name from user.

  • User Avatar
    0
    itarizin created

    Hi, sorry to jump in on this topic, but this give me chance to ask a related question.

    There's a way for the framework to identify the tenant by the subdomain? If so, it would be nice because the users will no need to specify a tenant, and the website will be able to apply tenant specific customization (themes...) since the very start.

    Is that possible? I couldn't find anything about.

    Thanks, great job Andrea

  • User Avatar
    0
    choochoo created

    Thank you for your replies, I'll do that!

  • User Avatar
    0
    hikalkan created
    Support Team

    @itarizin sure, it's possible. But this is application specific. Read tenancy name from url (subdomain), auto fill tenancyname (on login form) and hide tenancy name input if you want. This is simplest solution which I used for AspNet Zero demo (creating a demo actually creates a tenant with subdomain, try creating a demo here: <a class="postlink" href="http://www.aspnetzero.com/">http://www.aspnetzero.com/</a>)