I'm following the directions in this article:
https://docs.asp.net/en/latest/security/authentication/cookie.html
I get "No authentication handler is configured to handle the scheme MyCookieMiddlewareInstance.
Startup.cs :
app.UseCookieAuthentication( new CookieAuthenticationOptions( )
{
AuthenticationScheme = "MyCookieMiddlewareInstance",
LoginPath = new PathString( "/Account/Signin/" ),
AccessDeniedPath = new PathString( "/Account/Forbidden/" ),
AutomaticAuthenticate = true,
AutomaticChallenge = true
} );
.
AccountController.cs :
var identity = new ClaimsIdentity( claims );
var claimsPrincipal = new ClaimsPrincipal( identity );
var authenticationProperties = new AuthenticationProperties( )
{
IsPersistent = true
};
await _httpContext.Authentication.SignInAsync( "MyCookieMiddlewareInstance", claimsPrincipal, authenticationProperties );
Any ideas?