Skip to content

Commit 8fc5762

Browse files
authored
Updates
1 parent 77c8737 commit 8fc5762

File tree

1 file changed

+54
-13
lines changed

1 file changed

+54
-13
lines changed

aspnetcore/security/authentication/identity.md

Lines changed: 54 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ Create an ASP.NET Core Blazor Web App project with Individual Accounts.
4545

4646
> [!NOTE]
4747
> For a Razor Pages experience, see the [Create a Razor Pages app with authentication](#create-a-razor-pages-app-with-authentication) section.
48+
>
49+
> For an MVC experience, see the [Create an MVC app with authentication](#create-an-mvc-app-with-authentication) section.
4850
4951
# [Visual Studio](#tab/visual-studio)
5052

51-
* Select the **Blazor Web App** template and select **Next**. Name the project **BlazorApp1**. Select **Next**.
53+
* Select the **Blazor Web App** template and select **Next**. Select **Next**.
5254
* Make the following selections:
5355
* **Authentication type**: **Individual Accounts**
5456
* **Interactive render mode**: **Server**
@@ -61,7 +63,9 @@ Create an ASP.NET Core Blazor Web App project with Individual Accounts.
6163
dotnet new blazor -au Individual -o BlazorApp1
6264
```
6365

64-
The preceding command creates a Blazor Web App using SQLite. To create the web app with LocalDB, run the following command:
66+
The `-o|--output` option creates a folder for the app with a folder name matching the default app name/namespace.
67+
68+
The preceding command creates a Blazor Web App using SQLite. To create the app with LocalDB, run the following command:
6569

6670
```dotnetcli
6771
dotnet new blazor -au Individual -uld -o BlazorApp1
@@ -73,42 +77,79 @@ The generated project includes Identity Razor components. The components are fou
7377

7478
* `/Components/Account/Pages/Register`
7579
* `/Components/Account/Pages/Login`
76-
* `/Components/Account/Pages/ChangePassword`
80+
* `/Components/Account/Pages/Manage/ChangePassword`
7781

78-
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).
7983

8084
[!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)]
8185

8286
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.
8387

8488
## Create a Razor Pages app with authentication
8589

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.
8791

8892
# [Visual Studio](#tab/visual-studio)
8993

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**.
9297

9398
# [.NET CLI](#tab/net-cli)
9499

95100
```dotnetcli
96-
dotnet new webapp --auth Individual -o WebApp1
101+
dotnet new webapp -au Individual -o WebApp1
97102
```
98103

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:
100107

101108
```dotnetcli
102-
dotnet new webapp --auth Individual -uld -o WebApp1
109+
dotnet new webapp -au Individual -uld -o WebApp1
103110
```
104111

105112
---
106113

107114
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:
108115

109-
* `/Identity/Account/Login`
110-
* `/Identity/Account/Logout`
111-
* `/Identity/Account/Manage`
116+
* `Areas/Identity/Pages/Account/Register`
117+
* `Areas/Identity/Pages/Account/Logoin`
118+
* `Areas/Identity/Pages/Account/Manage/ChangePassword`
119+
120+
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:
149+
150+
* `Areas/Identity/Pages/Account/Register`
151+
* `Areas/Identity/Pages/Account/Logoin`
152+
* `Areas/Identity/Pages/Account/Manage/ChangePassword`
112153

113154
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).
114155

0 commit comments

Comments
 (0)