This sample features:
- A Blazor Web App with global Auto interactivity.
- This adds a
PersistingAuthenticationStateProvider
andPersistentAuthenticationStateProvider
services to the server and client Blazor apps respectively to capture authentication state and flow it between the server and client.
- This adds a
- OIDC authentication with Microsoft Entra without using Entra-specific packages.
- The goal is that this sample can be used as a starting point for any OIDC authentication flow.
- Automatic non-interactive token refresh with the help of a custom
CookieOidcRefresher
.
Configure the OIDC provider using the comments in the Program.cs file.
- Open the
BlazorWebAppOidc
solution file in Visual Studio. - Select the
BlazorWebAppOidc
project in Solution Explorer and start the app with either Visual Studio's Run button or by selecting Start Debugging from the Debug menu.
In a command shell, navigate to the BlazorWebAppOidc
project folder and use the dotnet run
command to run the sample.