SignInManager<T> handles the central work of signing users in and out with ASP.NET Core Identity. During login, it loads the user, validates the submitted password, creates an authenticated ClaimsPrincipal, assigns it to HttpContext.User, and stores the principal in an encrypted authentication cookie. section 23.1.2 section 23.7
A typical sign-in request proceeds as follows:
- A Razor Page receives the username and password through model binding. section 23.1.2
- SignInManager loads the matching user entity and checks the password; Identity stores passwords as strong one-way hashes rather than plain text. section 23.1.2
- After successful validation, SignInManager replaces the anonymous request principal, adds claims such as the email address, and sets the encrypted cookie. section 23.1.2
- The default Identity UI uses SignInManager<T> for registration and login flows, while application code supplies or customizes the UI. section 23.7
Figure 23.2 Signing in to an ASP.NET Core application. SignInManager is responsible for setting HttpContext.User to the new principal and serializing the principal to the encrypted cookie.
Trace the login request from form submission through principal creation, HttpContext.User assignment, and encrypted-cookie serialization. section 23.1.2

