Open Closed

No way to sign out user after deactivating tenant #2771


User avatar
0
dmeagor created
  • ABP Framework version: v5.11
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

To allow our users to close their accounts properly, I set the tenant activation state to Passive, then try to sign them out with OAuthService.logOut, but get the following view. All pages in the identity server MVC show this message until the cookie expires.


3 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    we will enhance it, for now, you need clear cookies manually

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You can try this:

    Configure<AbpAspNetCoreMultiTenancyOptions>(options =>
    {
        options.MultiTenancyMiddlewareErrorPageBuilder = (httpContext, exception) =>
        {
            foreach (var cookie in httpContext.Request.Cookies)
            {
                httpContext.Response.Cookies.Delete(cookie.Key);
            }
            httpContext.Response.Redirect(httpContext.Request.Path);
            return Task.CompletedTask;
        };
    });
    
  • User Avatar
    0
    luke created

    That worked a charm, thank you :)

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11