AspNetCore.Docs icon indicating copy to clipboard operation
AspNetCore.Docs copied to clipboard

Authentication scheme configuration

Open chrisdrobison opened this issue 1 year ago • 0 comments

Description

Buried in the Blazor docs is this:

Authentication scheme configuration is automatically read from builder.Configuration["Authentication:Schemes:{SCHEME NAME}:{PropertyName}"], where the {SCHEME NAME} placeholder is the scheme, which is MicrosoftOidc by default. Because configuration is preconfigured, a client secret can automatically be read via the Authentication:Schemes:MicrosoftOidc:ClientSecret configuration key. On the server using environment variables, name the environment variable Authentication__Schemes__MicrosoftOidc__ClientSecret:

This should be placed more prominently in some section in the authentication docs.

Page URL

https://learn.microsoft.com/en-us/aspnet/core/security/authentication/?view=aspnetcore-8.0

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/security/authentication/index.md

Document ID

48e4e204-ea22-c225-0cbc-0d811bdb90ed

Article author

@mjrousos

chrisdrobison avatar Jun 26 '24 03:06 chrisdrobison