Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

Commit e412ec0

Browse files
natemcmasterdavidfowl
authored andcommitted
Complete a TODO in "4. Add auth features.md" (#78)
* Update 4. Add auth features.md * Update 4. Add auth features.md * Update 4. Add auth features.md
1 parent 4b7f759 commit e412ec0

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

docs/4. Add auth features.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,19 @@ In this module we're going to add the capability for users to register and sign-
1313
1. Click the "Add" button
1414

1515
### Adding Identity via the Command Line
16-
**TODO**
16+
1. Open a command line to the **FrontEnd** project folder
17+
1. If you haven't done this already, install the command-line scaffolding tool.
18+
```
19+
dotnet tool install -g dotnet-aspnet-codegenerator
20+
```
21+
1. Add the Microsoft.VisualStudio.Web.CodeGeneration.Design package to the project.
22+
```
23+
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design --version 2.2.0
24+
```
25+
1. Run this command to generate the code to use Identity.
26+
```
27+
dotnet aspnet-codegenerator identity --dbContext FrontEnd.Data.IdentityDbContext --userClass FrontEnd.Data.User
28+
```
1729

1830
## Organize the newly created files
1931
> Note the new files added to the project in the "Areas/Identity" folder. We're going to clean these up a little to better match this project's conventions.
@@ -30,7 +42,7 @@ In this module we're going to add the capability for users to register and sign-
3042
## Add the Identity links to the site header
3143
> The scaffolded out Identity system includes a Razor partial view that contains the Identity-related UI for the site header, e.g. Login and Register links, user name once logged in, etc. We need to add a call to this partial from our site's own layout page:
3244

33-
1. Open the `_Layout.cs` file and find the following line: `<div class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse">`
45+
1. Open the `_Layout.cshtml` file and find the following line: `<div class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse">`
3446
1. Immediately after this line, add a call to render the newly added `_LoginPartial.cshtml` using the `<partial />` Tag Helper:
3547
``` html
3648
<div class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse">

0 commit comments

Comments
 (0)