Skip to content

Commit cb3a8fc

Browse files
Copilotilonatommy
andcommitted
Change DeserializedAuthenticationStateProvider registration to singleton in WASM
Co-authored-by: ilonatommy <32700855+ilonatommy@users.noreply.github.com>
1 parent f35c3da commit cb3a8fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static class WebAssemblyAuthenticationServiceCollectionExtensions
3131
public static IServiceCollection AddAuthenticationStateDeserialization(this IServiceCollection services, Action<AuthenticationStateDeserializationOptions>? configure = null)
3232
{
3333
services.AddOptions();
34-
services.TryAddScoped<AuthenticationStateProvider, DeserializedAuthenticationStateProvider>();
34+
services.TryAddSingleton<AuthenticationStateProvider, DeserializedAuthenticationStateProvider>();
3535
RegisterPersistentComponentStateServiceCollectionExtensions.AddPersistentServiceRegistration<AuthenticationStateProvider>(services, RenderMode.InteractiveWebAssembly);
3636
if (configure != null)
3737
{

0 commit comments

Comments
 (0)