Open Closed

Disabled/Redirect /Account/Manage to Auth Server project homepage #5628


User avatar
0
e.ruiz1 created

Hello,

We are using single sign-on (SSO ADFS) in our application. Therefore, we don't need a page where user can manage their account. We would like to disable the page /Account/Manage or redirect back to the root of the auth server project in our tiered deployment. What would be the best practice for this?

  • ABP Framework version: v7.3.3
  • UI Type: MVC
  • Database System: EF Core (SQL Server, )
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

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

    Hi,

    You can write a middleware to intercept the request and redirect to the Index page

    For example:

    app.Use(async (context, next) =>
    {
        if(context.Request.Path.ToString().Contains("account/manage", StringComparison.InvariantCultureIgnoreCase))
        {
            context.Response.Redirect(".....");
            return;
        }
       
        await next.Invoke();
    });
    
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11