Ends in:
7 DAYS
14 HRS
45 MIN
37 SEC
Ends in:
7 D
14 H
45 M
37 S
Open Closed

Angular Domain Tenant Resolver #347


User avatar
0
ninomartini created
  • ABP Framework version: v3.0.4
  • UI type: Angular
  • Tiered (MVC) or Identity Server Seperated (Angular): No

I am trying to get my Angular UI to set the tenant based on the subdomain. I modified the enviroment.prod.ts file to include a baseUrl.

export const environment = {
  //...
  application: {
    baseUrl: 'https://{0}.mydomain.com/'
  },
  //...
}

I also tried with and without the following tenant resolver in the Host project:

Configure<AbpTenantResolveOptions>(options =>
{
    options.TenantResolvers.Insert(1, new DomainTenantResolveContributor("{0}.mydomain.com"));
});

10 Answer(s)
  • User Avatar
    0
    Mehmet created

    Hi @ninomartini

    This feature will be available in v3.1. You can find the implementation this document. After the v3.1 release, the document will be available on docs.abp.io.

    You can check the release date of v3.1 version here.

  • User Avatar
    0
    ninomartini created

    Hello @mehmet

    Thank you for your response. I will wait and test this feature when v3.1 is released.

  • User Avatar
    0
    hikalkan created
    Support Team Co-Founder

    Closing. Please reopen if you need.

  • User Avatar
    0
    ninomartini created

    Hello @mehmet

    I was able to get the Angular domain tenant resolver to work in v3.1.2. Is there a way to hide the tenant selection from the login page without recreating the login page?

  • User Avatar
    0
    Mehmet created

    Hello

    Which authorization flow do you using? Authorization code flow (redirects MVC UI) or resource owner password flow (redirects login page of Angular account module)?

  • User Avatar
    0
    ninomartini created

    I converted the project from v3.0.5 to v3.1.2 and kept the resource owner password authentication.

  • User Avatar
    0
    Mehmet created

    Tenant selection box is only visible for host. This will not appear in tenant subdomains. You can hide it via MultiTenancyService like below:

    import { MultiTenancyService } from '@abp/ng.core';
    
    //...
    constructor(private multiTenancyService: MultiTenancyService) {
        this.multiTenancyService.isTenantBoxVisible = false;
    }
    
    
  • User Avatar
    0
    ninomartini created

    The tenant selection box is showing for both the host and the tenant. If a user navigates to the site using the subdomain the tenant name is automatically populated but still visiable . I did have to change the tenant name to all lowercase to make that work. Setting the isTenantBoxVisible ​fom the AppModule did not work for me.

  • User Avatar
    0
    ninomartini created

    Reopening issue, please see previous post.

  • User Avatar
    0
    armanozak created

    Hi @ninomartini,

    There is a bug regarding isTenantBoxVisible. It will work as of v3.3 as @Mehmet described.

    I will close the issue, but if the problem continues after v3.3, please feel free to reopen it.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06