Activities of "listtraderdev2"

Hello. Where do I find the IHostTenantRepository

hi

You can add a new component to switch the current tenant.

If the new tenant name exists, Replace the current URL.

  1. https://tenant1.localhost:4200 try to link a new user that belongs to tenant2.
  2. User enters a new tenant2
  3. Checkthat tenant2 exists.
  4. Replace https://tenant1.localhost:4200 with https://tenant2.localhost:4200

Thank you for the guide.

For the custom switch component, per my understanding, I had to override these files; tenant-switch.js, TenantSwitchModal.cshtml and TenantSwitchModal.cshtml.cs. as found here https://github.com/abpframework/abp/tree/aec138a17fdfcb584f63ab69bd1e86064e53cd2d/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy

In the Account layout of LeptonX theme I changed the highlighted block to this so I could still get the switch account option only when linking

@if (!currentPageUrl.Contains("TenantRegister") && MultiTenancyOptions.Value.IsEnabled && (currentQueryString != null && currentQueryString.Contains("linkLogin"))) { <div> <div class="row"> <div class="col"> <span style="font-size: .8em;" class="text-uppercase text-muted">@MultiTenancyStringLocalizer["Tenant"]</span><br /> <h6 class="m-0 d-inline-block"> @if (CurrentTenant.Id == null) { <span> @MultiTenancyStringLocalizer["NotSelected"] </span> } else { <strong> @(CurrentTenant.Name ?? CurrentTenant.Id.Value.ToString()) </strong> } </h6> </div> <div class="col-auto"> <a id="AbpTenantSwitchLink" href="javascript:;" class="btn btn-sm btn-outline-primary">@MultiTenancyStringLocalizer["Switch"]</a> </div> </div> </div>

but I am not sure what to do for this step

  1. Replace https://tenant1.localhost:4200 with https://tenant2.localhost:4200

I have been able to get this part to work. I can now link accounts with custom tenant domains.

The pending issue is that. when I go to the linked accounts list and I login with any of the accounts, I am successfully logged into the tenant but we are not redirected to the new tenant's URL instead we stay at the previous tenants URL. Similar issue as this. https://abp.io/support/questions/4615/Impersonate-tenant-issue-with-custom-tenant-resolver-by-sub-domain

Please help me fix

On the other hand I still have this issue :- The problem we are finding though is that if we attempt to impersonate a tenant from the host, we are not redirected to the tenant's URL (tenant1.domain.com) instead we stay at at the host URL with no subdomain (domain.com). as seen here - https://abp.io/support/questions/4615/Impersonate-tenant-issue-with-custom-tenant-resolver-by-sub-domain

I feel I need to resolve this first to get the link account working. If that is the case can you guide me on this also? the solution to that problem is no longer available at the link you provided (https://github.com/balessi75/FM.Test/issues/1)

hi

You can add a new component to switch the current tenant.

If the new tenant name exists, Replace the current URL.

  1. https://tenant1.localhost:4200 try to link a new user that belongs to tenant2.
  2. User enters a new tenant2
  3. Checkthat tenant2 exists.
  4. Replace https://tenant1.localhost:4200 with https://tenant2.localhost:4200

Thank you for the guide.

For the custom switch component, per my understanding, I had to override these files; tenant-switch.js, TenantSwitchModal.cshtml and TenantSwitchModal.cshtml.cs. as found here https://github.com/abpframework/abp/tree/aec138a17fdfcb584f63ab69bd1e86064e53cd2d/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy

In the Account layout of LeptonX theme I changed the highlighted block to this so I could still get the switch account option only when linking

@if (!currentPageUrl.Contains("TenantRegister") && MultiTenancyOptions.Value.IsEnabled && (currentQueryString != null && currentQueryString.Contains("linkLogin"))) { <div> <div class="row"> <div class="col"> <span style="font-size: .8em;" class="text-uppercase text-muted">@MultiTenancyStringLocalizer["Tenant"]</span><br /> <h6 class="m-0 d-inline-block"> @if (CurrentTenant.Id == null) { <span> @MultiTenancyStringLocalizer["NotSelected"] </span> } else { <strong> @(CurrentTenant.Name ?? CurrentTenant.Id.Value.ToString()) </strong> } </h6> </div> <div class="col-auto"> <a id="AbpTenantSwitchLink" href="javascript:;" class="btn btn-sm btn-outline-primary">@MultiTenancyStringLocalizer["Switch"]</a> </div> </div> </div>

but I am not sure what to do for this step

  1. Replace https://tenant1.localhost:4200 with https://tenant2.localhost:4200

Received. I will try it out and give you feedback.

Thank you for the response. I have sent the email as requested.

Hi.

I dont have a custom link login page. I currently rely on the default implementation

Can you please provide me with some samples. All my authentication pages are in the HttpApi.Host project not the angular side.

hi

What's the value of ReturnUrl?

the returnUrl is returnUrl=~%2F please check the image attached earlier.

And does your URL exist in RedirectAllowedUrls?

{ 
  "App": { 
    "RedirectAllowedUrls": "http://localhost:4200,https://localhost:44307" 
  } 
} 
 

Yes my URL exists in RedirectAllowedUrls

{
  "App": {
  "RedirectAllowedUrls": "http://{{tenantName}}.localhost:4200,https://{{tenantName}}.localhost:44348"
  }

I also tried using it without the {{tenantName}}

Showing 1 to 10 of 18 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on December 12, 2025, 10:36
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.