Open Closed

Set Tenant based on the emailaddress #7475


0
pankajminda created

Hi,

In our application one user will be linked to only one tenant, in such case we want the user to login without using subdomains or selecting the tenant in login page. During the login validation we want to set the Tenant id on the server side based on the emailAddress.

Regards, Pankaj


2 Answer(s)
  • 0
    ryancyq created

    Hi, you can modify the Login method of your LoginManager.LoginAsync() to not filter/find user base on tenant id.

    https://github.com/aspnetboilerplate/aspnetboilerplate/blob/210247cb9fcfc1edf7ad909b685291546d3bcbd9/src/Abp.ZeroCore/Authorization/AbpLoginManager.cs#L81

  • 0
    pankajminda created

    Thanks worked well!