No authenticationScheme was specified, and there was no DefaultChallengeScheme found Cookies Authentication
authenticationBuilder.AddCookie(“MyCookieMiddlewareInstance”, …) This registers a cookie authentication handler using the authentication scheme name “MyCookieMiddlewareInstance”. So whenever you are referring to the cookie authentication scheme, you will need to use that exact name, otherwise you will not find the scheme. However, in the AddAuthentication call, you are using a different scheme name: services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme) This registers the … Read more