简体   繁体   中英

How does Identity work in project template with Individual user account for ASP.NET Core MVC 3.1?

Upon clicking on register link, it displays page but under Areas/Identity there are no pages. We can scaffold identity for empty template, but how is it working for web application template for individual user account?

Register page

Area/Identity

We can scaffold identity for empty template, but how is it working for web application template for individual user account?

It seems that you created an ASP.NET Core Web Application project with Individual User Accounts , which would help integrate and configure ASP.NET Core Identity as a Razor Class Library in the generated project.

在此处输入图像描述

If you'd like to customize the UI of identity, you can also apply the scaffolder to selectively add the source code contained in the Identity Razor Class Library (RCL) and modify the code and change the behavior.

在此处输入图像描述

For more information, please check this doc about "Scaffold Identity into an MVC project without existing authorization" .

You will need to setup an Identity store where user information can be saved. You could setup an in-memory store but at some point you will want to persist account information so you'll want to setup a database in SQL Server, MySQL, or some other system to save the data.

As to the pages. They are being pulled from the Identity libraries. They provide a default setup that, as you mentioned, can be changed. The register piece, and sign-in/out will still need the data store to persist any information. Once you setup the datastore in the startup.cs class it will be injected into the applicable classes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM