[Discussion] Single authentication scheme is treated as default scheme #42828
Labels
announcement
This issue is an announcement about important functionality change (prevents auto-closing)
area-auth
Includes: Authn, Authz, OAuth, OIDC, Bearer
Milestone
Starting in .NET 7 Preview 7, we introduced new behavior in the authentication area in ASP.NET Core to reduce boilerplate and help build sensible defaults into ASP.NET Core.
Previously, users were always required to set the default authentication scheme that would be used by authentication and authorization handlers, like so:
Moving forward, when (and only when) a single authentication scheme is registered, that scheme will be treated as the default scheme. For example, "foobar" will be treated as the default scheme in the code below.
This change might expose unintended behavior changes in applications, such as authentication options being validated earlier than expected.
The text was updated successfully, but these errors were encountered: