Great! You have registered the Authentication Middleware and prepared the database. In the next step, you are going to implement basic user authentication for the Tic-Tac-Toe application.
The following example demonstrates how to modify the user registration and add a simple login form with a user login and password textbox for authenticating users:
- Add a new Model called LoginModel to the Models folder:
public class LoginModel { [Required] public string UserName { get; set; } [Required] public string Password { get; set; } public string ReturnUrl { get; set; } }
- Add a new folder called Account to the Views folder, and add a new file called Login.cshtml within this new folder; it will contain the ...