Hello, I am Tolga Şükrü Özkan. I am a 3rd year student at Ankara Yıldırım Beyazıt University, Department of Computer Engineering. I am doing my internship at RyseSoft company. In this article, I will try to explain the Microsoft Identity in .NET.
What is Asp.Net Core Identity?
It is a membership system framework that was created to replace the outdated membership system Membership in Asp.NET applications. It includes endless customisable features, a deeper and more flexible management interface, and a larger range of member accessibility.
Members’ login, logout, authorisation, token, password reminder, etc. are all supported by Asp.NET Core Identity. In contrast to earlier generations, it is a contemporary membership system that enables us to complete all operations fast and supports our applications without any limitations. It is current since it enables contemporary login procedures offered by current third sources (Facebook Login, Google Login, Twitter Login, etc.) and completes the entire structure swiftly.
Let’s Build Our Project with Asp.Net Core Identity
First of all, add a ASP.net Core Web App(Model-View-Controller).
I would like to talk about the next page. First look at the page.
In this page, there are lot of things but today I’m just going to talk about Authentication Type.
At this stage, there are several identity types, but I do not use this part. I’m going to show manuel installation as a scaffold.
Adding Scaffol Identity to Your ASP.Net Core Project
I want to talk about a few things on this page. First, you need to select the Layout page. Secondly, if you want to use and edit all pages in the frontend, select the Override all files option. Otherwise, you can only interfere with the pages you have selected. Finally, if you don’t have a Data context class, you can add it by clicking the “+” button on the right. If you want to add something to your User class, you need to add your user class at the bottom.
The latest version of our page at this stage:
Solution Explorer should look like this:
After these steps you must configure your Program.cs file like this:
1-) AddDefaultIdentity section;
2-) Add Services with Dependency Injection;
3-) Add Razor Pages Extension(because Identity Pages created with Razor Pages)
Finally, we learned about the Asp.NET Core Identity library in this article and learned how to use a few basic terms.
Hope to see you in my next articles…
Author:Tolga Şükrü Özkan
Love podcasts or audiobooks? Learn on the go with our new app.
KOREA ARTIZ STUDIO
Microsoft Identity in Asp.NET Core | by RyseSoft | Aug, 2022 – Medium