Starts in:
0 DAY
8 HRS
56 MIN
30 SEC
Starts in:
0 D
8 H
56 M
30 S
Open Closed

TenantResolver don’work with Blazor WebAssambly #1429


User avatar
0
maxim@kolychev.msk.ru created

We can't configure TenantResolver for a project with Blazor separated IdentityServer

There are no sample for Blazor. Sample code for MVC-Tiered we found here https://github.com/abpframework/abp-samples/tree/master/DomainTenantResolver/MVC-TIERED

This code was added to IdentityServerModule:

context.Services.AddAbpStrictRedirectUriValidator(); 
context.Services.AddAbpClientConfigurationValidator();  
context.Services.AddAbpWildcardSubdomainCorsPolicyService();  
Configure<AbpTenantResolveOptions>(option => { 
    option.AddDomainTenantResolver("{0}.sportoteka.online"); 
});

to BlazorModule:

Configure<AbpTenantResolveOptions>(options => {  
    options.TenantResolvers.InsertAfter( 
        r => r is CurrentUserTenantResolveContributor, 
        new DomainTenantResolveContributor("{0}.sportoteka.info"));  
});

sportoteka.info – client domain, sportoteka.online – Api and IdentityServer

  1. No problems with connection to host
  2. Adding *.sportoteka.info to appsetting and/or IdentitiServer.. Cors/Uris tables leads to 500 error Unauthorized Client
  3. Without this record we’ve got message in console Refused to display '' in a frame because it set 'X-Frame-Options' to 'sameorigin' and on login 500 error INVALID_REQUEST (see here https://test-sh.sportoteka.info )
  4. If I add real tenant – no errors but connection to host, not to tenant (https://test-vb.sportoteka.info)

What’s wrong? Could you add TenantResolver Blazor sample


4 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    We currently can't implement the above functions in wasm due to the limitation of blazor.

  • User Avatar
    0
    maxim@kolychev.msk.ru created

    Hi

    When will it be possible? Are there other authorization options for wasm?

    Maxim

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi Maxim

    I can't confirm when it can be supported, because Blazor does not allow we to do so, maybe we have to wait for asp net core 6.0.

    https://docs.microsoft.com/en-us/aspnet/core/blazor/security/webassembly/standalone-with-authentication-library?view=aspnetcore-5.0&tabs=visual-studio

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

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