打开 关闭

No way to sign out user after deactivating tenant #2771


User avatar
0
dmeagor 创建
  • 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 答案
  • User Avatar
    0
    liangshiwei 创建
    支持团队 Fullstack Developer

    Hi,

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

  • User Avatar
    0
    liangshiwei 创建
    支持团队 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 创建

    That worked a charm, thank you :)

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