You may be pleased to hear that ASP.NET Core includes built-in authentication methods in its web template. In fact, creating the sample projects mentioned in previous chapters will result in a functioning web application with authentication included. If you start a brand new project, this section will also help you identify what you need to do to include authentication.
Here is a high-level overview of how you can enable authentication in a new ASP.NET Core application using the web template:
Create a new project with a web template.
Select the authentication method.
Verify the packages and references.
Verify the code in the
Startup.cs
class.Add additional identity options as needed.
Add external providers as needed.
If you want to start with an empty project, you can perform the following steps:
Create a new empty web project.
Do not select an authentication method.
Add packages and references for authentication.
Add code to the
Startup.cs
class...