[Bug] No authenticationScheme was specified, and there was no DefaultChallengeScheme found in 1.9.2 release
See original GitHub issueHi,
I am getting No authenticationScheme was specified, and there was no DefaultChallengeScheme found
issue in version 1.9.2. I literally have no changes apart from package upgrade.
Here is the full error.
{"ClassName":"System.InvalidOperationException","Message":"No authenticationScheme was specified, and there was no DefaultChallengeScheme found. The default schemes can be set using either AddAuthentication(string defaultScheme) or AddAuthentication(Action<AuthenticationOptions> configureOptions).","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at Microsoft.AspNetCore.Authentication.AuthenticationService.ChallengeAsync(HttpContext context, String scheme, AuthenticationProperties properties)\r\n at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":null,"HResult":-2146233079,"Source":"Microsoft.AspNetCore.Authentication.Core","WatsonBuckets":null}
And app is working fine when I revert back to 1.9.1.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
We’ll have a look at what changed (but I’m surprised as multi-scheme is what is coming next), and your code shoudn’t have worked in the previous version (as you don’t provide a default scheme in
AddAuthentication
Meanwhile, if you want to use the latest version:closing, but feel free to reopen @santosh-jallapuram