Skip to content

Commit 9f1fb88

Browse files
Copilotilonatommy
andcommitted
Add AuthenticationStateProvider registration to TryAddEnumerable
Co-authored-by: ilonatommy <32700855+ilonatommy@users.noreply.github.com>
1 parent cb3a8fc commit 9f1fb88

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +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+
builder.Services.TryAddEnumerable(ServiceDescriptor.Scoped<AuthenticationStateProvider, AuthenticationStateSerializer>());
4647
builder.Services.TryAddScoped(sp => (AuthenticationStateSerializer)sp.GetRequiredService<AuthenticationStateProvider>());
4748
RegisterPersistentComponentStateServiceCollectionExtensions.AddPersistentServiceRegistration<AuthenticationStateProvider>(builder.Services, RenderMode.InteractiveAuto);
4849
if (configure is not null)

0 commit comments

Comments
 (0)