Skip to content

Commit 56573f1

Browse files
Copilotilonatommy
andcommitted
Update AuthenticationState registration to use AuthenticationStateProvider interface
Co-authored-by: ilonatommy <[email protected]>
1 parent f763294 commit 56573f1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Components/WebAssembly/Server/src/WebAssemblyRazorComponentsBuilderExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static IRazorComponentsBuilder AddInteractiveWebAssemblyComponents(this I
4343
public static IRazorComponentsBuilder AddAuthenticationStateSerialization(this IRazorComponentsBuilder builder, Action<AuthenticationStateSerializationOptions>? configure = null)
4444
{
4545
builder.Services.TryAddEnumerable(ServiceDescriptor.Scoped<IHostEnvironmentAuthenticationStateProvider, AuthenticationStateSerializer>());
46-
RegisterPersistentComponentStateServiceCollectionExtensions.AddPersistentServiceRegistration<AuthenticationStateSerializer>(builder.Services, RenderMode.InteractiveWebAssembly);
46+
RegisterPersistentComponentStateServiceCollectionExtensions.AddPersistentServiceRegistration<AuthenticationStateProvider>(builder.Services, RenderMode.InteractiveWebAssembly);
4747
if (configure is not null)
4848
{
4949
builder.Services.Configure(configure);

src/Components/WebAssembly/WebAssembly.Authentication/src/WebAssemblyAuthenticationServiceCollectionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static IServiceCollection AddAuthenticationStateDeserialization(this ISer
3232
{
3333
services.AddOptions();
3434
services.TryAddScoped<AuthenticationStateProvider, DeserializedAuthenticationStateProvider>();
35-
RegisterPersistentComponentStateServiceCollectionExtensions.AddPersistentServiceRegistration<DeserializedAuthenticationStateProvider>(services, RenderMode.InteractiveWebAssembly);
35+
RegisterPersistentComponentStateServiceCollectionExtensions.AddPersistentServiceRegistration<AuthenticationStateProvider>(services, RenderMode.InteractiveWebAssembly);
3636
if (configure != null)
3737
{
3838
services.Configure(configure);

0 commit comments

Comments
 (0)