Skip to content

Commit 71cf063

Browse files
authored
Update service registration (#35314)
1 parent 2598cef commit 71cf063

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

aspnetcore/blazor/hybrid/security/maui-blazor-web-identity.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,10 @@ In `MauiBlazorWeb/MauiProgram.cs`, core functionality is added by calling <xref:
210210
builder.Services.AddAuthorizationCore();
211211
```
212212

213-
Registration of the app's custom <xref:Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider> (`MauiAuthenticationStateProvider`):
213+
The app's custom <xref:Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider> (`MauiAuthenticationStateProvider`) is registered in `MauiProgram.cs`:
214214

215215
```csharp
216-
builder.Services.AddScoped<MauiAuthenticationStateProvider,
217-
MauiAuthenticationStateProvider>();
216+
builder.Services.AddScoped<MauiAuthenticationStateProvider>();
218217
```
219218

220219
Use the `MauiAuthenticationStateProvider` when the app requires an <xref:Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider>:

0 commit comments

Comments
 (0)