You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blazor Identity components can be viewed in the [Blazor project template in the ASP.NET Core reference source (`dotnet/aspnetcore` GitHub repository)](https://github.com/dotnet/aspnetcore/tree/main/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Account).
82
+
Identity Razor components are described individually in the documentation for specific use cases and are subject to change each release. To view all of the components in the framework, see the [Blazor project template in the ASP.NET Core reference source (`dotnet/aspnetcore` GitHub repository)](https://github.com/dotnet/aspnetcore/tree/main/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/Account).
For more information, see <xref:blazor/security/index> and the articles that follow it in the Blazor documentation. Most of the articles in the *Security and Identity* area of the main ASP.NET Core documentation set apply to Blazor apps. However, the Blazor documentation set contains articles and guidance that supercedes or adds information. We recommend studying the general ASP.NET Core documentation set first, followed by accessing the articles in the Blazor *Security and Identity* documentation.
83
87
84
88
## Create a Razor Pages app with authentication
85
89
86
-
Create an ASP.NET Core Web Application project with Individual Accounts.
90
+
Create an ASP.NET Core Web Application (Razor Pages) project with Individual Accounts.
87
91
88
92
# [Visual Studio](#tab/visual-studio)
89
93
90
-
* Select the **ASP.NET Core Web App** template. Name the project **WebApp1**. Click **OK**.
91
-
* In the **Authentication type** input, select **Individual Accounts**.
94
+
* Select the **ASP.NET Core Web App (Razor Pages)** template. Select **Next**.
95
+
* For the **Authentication type** input, select **Individual Accounts**.
96
+
* Select **Create**.
92
97
93
98
# [.NET CLI](#tab/net-cli)
94
99
95
100
```dotnetcli
96
-
dotnet new webapp --auth Individual -o WebApp1
101
+
dotnet new webapp -au Individual -o WebApp1
97
102
```
98
103
99
-
The preceding command creates a Razor web app using SQLite. To create the web app with LocalDB, run the following command:
104
+
The `-o|--output` option creates a folder for the app with a folder name matching the default app name/namespace.
105
+
106
+
The preceding command creates a Razor Pages app using SQLite. To create the app with LocalDB, run the following command:
100
107
101
108
```dotnetcli
102
-
dotnet new webapp --auth Individual -uld -o WebApp1
109
+
dotnet new webapp -au Individual -uld -o WebApp1
103
110
```
104
111
105
112
---
106
113
107
114
The generated project provides [ASP.NET Core Identity](xref:security/authentication/identity) as a [Razor class library](xref:razor-pages/ui-class). The Identity Razor class library exposes endpoints with the `Identity` area. For example:
Pages are described individually in the documentation for specific use cases and are subject to change each release. To view all of the pages in the framework, see the [ASP.NET Core reference source (`dotnet/aspnetcore` GitHub repository, `Identity/UI/src/Areas/Identity/Pages` folder)](https://github.com/dotnet/aspnetcore/tree/main/src/Identity/UI/src/Areas/Identity/Pages).
121
+
122
+
## Create an MVC app with authentication
123
+
124
+
Create an ASP.NET Core MVC project with Individual Accounts.
125
+
126
+
# [Visual Studio](#tab/visual-studio)
127
+
128
+
* Select the **ASP.NET Core Web App (Model-View-Controller)** template. Select **Next**.
129
+
* For the **Authentication type** input, select **Individual Accounts**.
130
+
* Select **Create**.
131
+
132
+
# [.NET CLI](#tab/net-cli)
133
+
134
+
```dotnetcli
135
+
dotnet new mvc -au Individual -o WebApplication1
136
+
```
137
+
138
+
The `-o|--output` option creates a folder for the app with a folder name matching the default app name/namespace.
139
+
140
+
The preceding command creates an MVC app using SQLite. To create the web app with LocalDB, run the following command:
141
+
142
+
```dotnetcli
143
+
dotnet new mvc -au Individual -uld -o WebApplication1
144
+
```
145
+
146
+
---
147
+
148
+
The generated project provides [ASP.NET Core Identity](xref:security/authentication/identity) as a [Razor class library](xref:razor-pages/ui-class). The Identity Razor class library is based on Razor Pages and exposes endpoints with the `Identity` area. For example:
Pages are described individually in the documentation for specific use cases and are subject to change each release. To view all of the pages, see the [ASP.NET Core reference source (`dotnet/aspnetcore` GitHub repository, `Identity/UI/src/Areas/Identity/Pages` folder)](https://github.com/dotnet/aspnetcore/tree/main/src/Identity/UI/src/Areas/Identity/Pages).
0 commit comments