Using custom identity database instead of ASP.NET core Identity and authenticating via cookie! (cookie auth works as expected however "User.Identity.Name" is always empty?)
How do I set and get the claim identity name "User.Identity.Name" ?
var claims = new[] { new Claim("name", "john"), new Claim(ClaimTypes.Role, "Admin") };
var identity = new ClaimsIdentity(claims, "MyCookieMiddlewareInstance");
await HttpContext.Authentication.SignInAsync("MyCookieMiddlewareInstance", new ClaimsPrincipal(identity));
