【发布时间】:2023-03-12 18:28:01
【问题描述】:
我的 Blazor 服务器端应用程序使用 Azure B2C 进行身份验证。注销后,用户被重定向到一个通用页面,通知注销成功。如何让应用重定向到主页(即登录页面)?
这是我的身份验证的一部分:
<AuthorizeView>
<Authorized>
@if (canEditProfile)
{
<a href="MicrosoftIdentity/Account/EditProfile" style="color: white">Hello, @context.User.Identity.Name!</a>
}
else
{
<span style="color: white">Hello, @context.User.Identity.Name!</span>
}
<a href="MicrosoftIdentity/Account/SignOut" style="color: white">Log out</a>
</Authorized>
<NotAuthorized>
<a href="MicrosoftIdentity/Account/SignIn" style="color: white">Log in</a>
</NotAuthorized>
</AuthorizeView>
【问题讨论】:
-
您在使用 MSAL 吗?
-
@JuanmaFeliu 是的,我愿意。
标签: azure-ad-b2c blazor-server-side