diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs index 666bcfadf0..b6902e86d8 100644 --- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs @@ -52,15 +52,7 @@ namespace Volo.Abp.Account.Web.Pages.Account //TODO: Reference AspNetCore MultiTenancy module and use options to get the tenant key! var tenant = context.Parameters[TenantResolverConsts.DefaultTenantKey]; - if (string.IsNullOrEmpty(tenant)) - { - if (Request.Cookies.ContainsKey(TenantResolverConsts.DefaultTenantKey)) - { - CurrentTenant.Change(null); - Response.Cookies.Delete(TenantResolverConsts.DefaultTenantKey); - } - } - else + if (!string.IsNullOrEmpty(tenant)) { CurrentTenant.Change(Guid.Parse(tenant)); Response.Cookies.Append(TenantResolverConsts.DefaultTenantKey, tenant);