【问题标题】:Customize Azure AD signout page自定义 Azure AD 注销页面
【发布时间】:2021-10-29 15:50:22
【问题描述】:

我正在使用 Azure AD 登录我的 ASP.NET Core 应用程序。退出链接是<a class="nav-link text-dark" asp-area="MicrosoftIdentity" asp-controller="Account" asp-action="SignOut">,退出成功后会将我重定向到MicrosoftIdentity/Account/SignedOut。如何让它重定向到另一个页面?

【问题讨论】:

标签: asp.net-core azure-active-directory microsoft-identity-platform


【解决方案1】:

在这种情况下,您可以构建自己的AccountController 而不是官方示例中的默认值,或者使用URL Rewriting Middleware 来重定向您想要的URL。

参考 - How to specify custom logout URL when using Azure AD authentication in .NET core

【讨论】:

  • AccountController 已从 ASP.NET Core 移至 Microsoft.Identity.Web。这仍然是解决方案吗?如果您甚至无法重定向回自己的网页,AccountController 似乎毫无用处。
猜你喜欢
  • 1970-01-01
  • 2021-02-09
  • 1970-01-01
  • 1970-01-01
  • 2019-10-23
  • 2020-03-08
  • 2018-04-02
  • 2020-04-29
  • 1970-01-01
相关资源
最近更新 更多