Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET Identity

I'm currently building a new ASP.NET MVC 5 project which I want to release around September. I need to choose a membership system, but I'm currently quite confused about which direction should I take. The current SimpleMembership works well, but will apparently be incompatible with the upcoming ASP.NET Identity. ASP.NET Identity on the other hand is absolutely new with zero documentation and can change anytime. Finally it seems that string based IDs are used here, which seems like a very unnecessary overhead compared to integer based IDs, which SimpleMembership supports. Is there a good, future proof way I can choose?

like image 826
Martin Zikmund Avatar asked Jul 14 '13 03:07

Martin Zikmund


People also ask

How does ASP.NET identity work?

ASP.NET Core Identity is a membership system which allows you to add login functionality to your application. Users can create an account and login with a user name and password or they can use an external login providers such as Facebook, Google, Microsoft Account, Twitter and more.

What is ASP.NET Identity Server?

IdentityServer is an authentication server that implements OpenID Connect (OIDC) and OAuth 2.0 standards for ASP.NET Core. It's designed to provide a common way to authenticate requests to all of your applications, whether they're web, native, mobile, or API endpoints.

Is ASP.NET identity free?

The new Duende IdentityServer continues to be open source, but now has a dual license. This license allows it to be used for free for development, testing, and learning, free for non-commercial open source, and free for use in commercial settings if the entity or organization makes less than 1 million USD/year.

What is identity C#?

Identity is used to find and allow the users to enter the application based on their authentication and authority. It does not allow anonymous users to enter the application.


1 Answers

I would advise against using SimpleMembership as well. You can still use int IDs in your database, you would just need to ToString() the ID when plugging in your database entity, i.e.:

public class MyUser : IUser {
   [Key]
   int UserID { get; set; }

   string IUser.Id { get { return UserId.ToString(); } }
}
like image 121
Hao Kung Avatar answered Sep 29 '22 14:09

Hao Kung