You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blazor migration guidance will appear here prior to the release of .NET 9, which is scheduled for November, 2024.
1
+
### Adopt simplified authentication state serialization for Blazor Web Apps
2
+
3
+
Blazor Web Apps can optionally adopt [simplified authentication state serialization](xref:aspnetcore-9#simplified-authentication-state-serialization-for-blazor-web-apps).
4
+
5
+
In the server project:
6
+
7
+
* Remove the Persisting Authentication State Provider (`PersistingAuthenticationStateProvider.cs`).
8
+
9
+
* Remove the service registration from the `Program` file. Instead, chain a call to <xref:Microsoft.Extensions.DependencyInjection.WebAssemblyRazorComponentsBuilderExtensions.AddAuthenticationStateSerialization%2A> on <xref:Microsoft.Extensions.DependencyInjection.RazorComponentsServiceCollectionExtensions.AddRazorComponents%2A>:
* Remove the Persistent Authentication State Provider (`PersistentAuthenticationStateProvider.cs`).
23
+
24
+
* Remove the service registration from the `Program` file. Instead, call <xref:Microsoft.Extensions.DependencyInjection.WebAssemblyAuthenticationServiceCollectionExtensions.AddAuthenticationStateDeserialization%2A> on the service collection:
0 commit comments