AdrienTorris / awesome-blazor

Resources for Blazor, a .NET web framework using C#/Razor and HTML that runs in the browser with WebAssembly.
Creative Commons Zero v1.0 Universal
8.74k stars 970 forks source link

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

Open DavidShochet opened 3 years ago

DavidShochet commented 3 years ago

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:

@if (canEditProfile) { Hello, @context.User.Identity.Name! } else { Hello, @context.User.Identity.Name! } Log out Log in