Mid
ASP.NET Core
ASP.NET Core
Cookie-based authentication?
Used in traditional MVC apps for session-based auth.
services.AddAuthentication(CookieAuthenticationDefaults.Authenticati
onScheme)
.AddCookie(options => {
options.LoginPath = "/Account/Login";
});
On login:
await HttpContext.SignInAsync(principal);
Cookies are stored in the browser and sent with each request.
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png