From ff595089b6e67e847d548e121a213d33ff4829ad Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Mon, 14 Feb 2022 11:33:34 -0600 Subject: [PATCH] Section only applies to Blazor Server (#24993) --- aspnetcore/blazor/security/index.md | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/aspnetcore/blazor/security/index.md b/aspnetcore/blazor/security/index.md index 635b7cee18..d090b6cd70 100644 --- a/aspnetcore/blazor/security/index.md +++ b/aspnetcore/blazor/security/index.md @@ -118,6 +118,8 @@ For more information on dependency injection (DI) and services, see and override `GetAuthenticationStateAsync`: ```csharp @@ -141,17 +143,7 @@ public class CustomAuthStateProvider : AuthenticationStateProvider } ``` -In a Blazor WebAssembly app, the `CustomAuthStateProvider` service is registered in `Main` of `Program.cs`: - -```csharp -using Microsoft.AspNetCore.Components.Authorization; - -... - -builder.Services.AddScoped(); -``` - -In a Blazor Server app, the `CustomAuthStateProvider` service is registered in `Program.cs`: +The `CustomAuthStateProvider` service is registered in `Program.cs`: ```csharp using Microsoft.AspNetCore.Components.Authorization;