我的 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>
Run Code Online (Sandbox Code Playgroud)