Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to redirect to home page after sign out in a Blazor serverside application #501

Open
DavidShochet opened this issue Jun 23, 2021 · 0 comments

Comments

@DavidShochet
Copy link

DavidShochet commented Jun 23, 2021

My Blazor server-side application is authenticated using Azure B2C. After signing out, the user is redirected to a generic page that informs that sign out was successful. How can I make the app redirect to the home page (i.e. login page) instead? I tried to change my app registration on Azure B2C, but did not succeed.

Here is a part of my authentication:

<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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant