相关疑难解决方法(0)

如何在 Blazor 服务器端应用程序中注销后重定向到主页

我的 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)

azure-ad-b2c blazor-server-side

1
推荐指数
1
解决办法
3997
查看次数

标签 统计

azure-ad-b2c ×1

blazor-server-side ×1