Activities of "thanhvl1"

do you need me to reproduce this and send you my log for further document ?

Because when I try to implement this middleware now it can bypass and the switch tenant now show as expected. But I don't know if it will cause other error

public sealed class StripCookiesForBearerAccountApiMiddleware : IMiddleware
{
    private const string AccountPublicApiPrefix = "/api/account";

    public async Task InvokeAsync(HttpContext context, RequestDelegate next)
    {
        var path = context.Request.Path;
        if (!path.StartsWithSegments(AccountPublicApiPrefix, StringComparison.OrdinalIgnoreCase))
        {
            await next(context);
            return;
        }

        var authHeader = context.Request.Headers.Authorization.ToString();
        if (string.IsNullOrEmpty(authHeader) ||
            !authHeader.StartsWith("Bearer ", StringComparison.OrdinalIgnoreCase))
        {
            await next(context);
            return;
        }

        context.Request.Headers.Remove("Cookie");
        await next(context);
    }
}

I exposed my app on AKS using the same domain admin angular: domain/admin authserver: domain/authserver

After fill all the headers to the postman, now I know it caused by Cookie header

With uncheck Cookie now it shows like we expected

1 thing to note that is this api called from Admin Angular but it return 2 tenants test1 and test2 (I have leaved 2 tenants fti and tff above then created new tenants and joined to them)

but when using token value to call from postman it return like what we expected.

checking 2-3 XHR the token Bear value is almost the same, it's from fti after switching tenant. The weird thing I've checked is that in localhost, I can still see Host as listed in the modal of switching tenant

I've got this issue when deploying to AKS, so is that maybe caused by a behind proxy ?

For more info, I use ABP version 10.3.0 And I got through the Switch Tenant modal in Angular admin I also try hard refresh test but still the same

I've used shared database

After choosing tenant fti then get the token to decode and I get

"tenantid": "3a1af4d8-364d-86dc-87c9-66b8c5f291f5" match this api

{
  "items": [
    {
      "tenantId": "3a1aff20-3e15-936d-eed4-9ae0c7235e8e",
      "tenantName": "tff",
      "email": "thanhvl1@aaa.com"
    },
    {
      "tenantId": "3a1af4d8-364d-86dc-87c9-66b8c5f291f5",
      "tenantName": "fti",
      "email": "thanhvl1@aaa.com"
    }
  ]
}

In this admin app is a standard Angular host: it uses @volo/abp.ng.account and provideAccountPublicConfig() in app.config.ts, plus Lepton X (@volosoft/abp.ng.theme.lepton-x). We do not ship a custom “Switch tenant” dialog implementation in our admin src/ tree.

I also have checked db and api

But there this is weird because when I logged in it's come to next screen choose tenants, in this UI, I see the Host

Hi, there is still 1 more thing related to this feature

for example I'm in Host tenant when I choose switch tenant I will see this

Then I change to "fti" tenant, this modal of switch tenant now no show Host tenant

thanks for your quick support, I'm missing setting this options.Applications["MVC"].RootUrl = configuration["AuthServer:Authority"]; in Identity

thanks for your guide, I implemented follow this guide and it worked

This worked perfectly. Thanks for your support

Showing 1 to 10 of 53 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.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.