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

Set Tenant based on the emailaddress #7475


User avatar
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)
  • User Avatar
    0
    ryancyq created
    Support Team

    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

  • User Avatar
    0
    pankajminda created

    Thanks worked well!