ASP NET Core Identity UserManager and SignInManager

kudvenkat
kudvenkat
173.1 هزار بار بازدید - 5 سال پیش - How to create a new
How to create a new user, using UserManager service provided by asp.net core identity.

How to sign-in a user using SignInManager service provided by asp.net core identity.

Text version of the video
https://csharp-video-tutorials.blogsp...

Healthy diet is very important for both body and mind. We want to inspire you to cook and eat healthy. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking.
@aarvikitchen5572

Slides
https://csharp-video-tutorials.blogsp...

ASP.NET Core Text Articles & Slides
https://csharp-video-tutorials.blogsp...

ASP.NET Core Tutorial
ASP.NET core tutorial for beginners

Angular, JavaScript, jQuery, Dot Net & SQL Playlists
https://www.youtube.com/user/kudvenka...

UserManager[IdentityUser] class contains the required methods to manage users in the underlying data store. For example, this class has methods like CreateAsync, DeleteAsync, UpdateAsync to create, delete and update users.

SignInManager[IdentityUser] class contains the required methods for users signin. For example, this class has methods like SignInAsync, SignOutAsync to signin and signout a user.

Both UserManager and SignInManager services are injected into the AccountController using constructor injection

Both these services accept a generic parameter. We use the generic parameter to specify the User class that these services should work with.

At the moment, we are using the built-in IdentityUser class as the argument for the generic parameter.

The generic parameter on these 2 services is an extension point.

This means, we can create our own custom user with any additional data that we want to capture about the user and then plug-in this custom class as an argument for the generic parameter instead of the built-in IdentityUser class.

For the code of the Register action method please refer to our blog at the following link
https://csharp-video-tutorials.blogsp...

At this point if you run the project and provide a valid email address and password, the user account should be created in AspNetUsers table in the underlying SQL server database. You could view this data from SQL Server Object Explorer in Visual Studio.
5 سال پیش در تاریخ 1398/03/15 منتشر شده است.
173,154 بـار بازدید شده
... بیشتر