diff options
author | Safia Abdalla <safia@microsoft.com> | 2022-07-07 06:34:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-07 06:34:45 +0300 |
commit | 08d17b8fd854a2d467204cba521e810157949b89 (patch) | |
tree | de4de8cb062cc1913355cc75295cf004e4fa2753 | |
parent | 9c14f54cf82d6b99a978cf3ca4ec1dfab9afe548 (diff) |
Check for non-scoped servicesaf/rm-wab-auth
-rw-r--r-- | src/DefaultBuilder/src/WebApplicationBuilder.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/DefaultBuilder/src/WebApplicationBuilder.cs b/src/DefaultBuilder/src/WebApplicationBuilder.cs index 9b79f39558..d002acd3a5 100644 --- a/src/DefaultBuilder/src/WebApplicationBuilder.cs +++ b/src/DefaultBuilder/src/WebApplicationBuilder.cs @@ -172,7 +172,7 @@ public sealed class WebApplicationBuilder // Process authorization and authentication middlewares independently to avoid // registering middlewares for services that do not exist - if (_builtApplication.Services.GetService<IAuthenticationService>() is not null) + if (_builtApplication.Services.GetService<IAuthenticationSchemeProvider>() is not null) { // Don't add more than one instance of the middleware if (!_builtApplication.Properties.ContainsKey(AuthenticationMiddlewareSetKey)) |