自定义 Azure AD 注销页面

Sys*_*own 0 azure-active-directory asp.net-core microsoft-identity-platform

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

Joy*_*ang 5

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

参考 -在 .NET Core 中使用 Azure AD 身份验证时如何指定自定义注销 URL

  • AccountController 已从 ASP.NET Core 移至 Microsoft.Identity.Web。这仍然是解决方案吗?如果您甚至无法重定向回您自己的网页,那么 AccountController 似乎毫无用处。 (2认同)