Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET Core Identity vs IdentityServer4

The question: Should I use .Net Core Identity or IdentityServer 4 with Identity

I need to build app with login/register functionality and allow users to use APIs to import/export data from my software. I also want to have external logins like google, twitter, etc.

And I'm not able to understand why would I need Identity Server when all things can be done using only Identity.

Why would I need or want IdentityServer ? I just need to get work done right and as simple as possible.

like image 309
ferdinand Avatar asked Jan 20 '18 10:01

ferdinand


People also ask

Do I need IdentityServer4?

Why do we need IdentityServer4? ASP.NET Identity can receive a security token from a third-party login provider like Facebook, Google, Microsoft and Twitter. But If you want to issue a security token for a local ASP.NET Identity user you need to work with a third-party library like IdentityServer4, OpenIddict.

What is Identity Server in .NET Core?

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.

What is the difference between identity and identity server?

ASP.NET Identity is a user store/identity management library. It includes some OWIN helper classes to hook into the OWIN security middleware, but otherwise has nothing to do with authentication. IdentityServer is an OpenID Connect provider, that acts as a central authentication server for multiple applications.

What is .NET identity?

ASP.NET Identity is Microsoft's user management library for ASP.NET. It includes functionality such as password hashing, password validation, user storage, and claims management. It usually also comes with some basic authentication, bringing its own cookies and multi-factor authentication to the party.


1 Answers

You really can't compare the two.

ASP.NET Identity is a database API to manage users, roles, claims, email confirmation tokens etc. Something you can use for implementing signup, login, change password etc.

IdentityServer is an OpenID Connect and OAuth 2.0 implementation. It gives you features like single sign-on and API access control. This is useful if you want to share users between multiple client applications.

You can combine both though - use IdentityServer for the protocol work, and ASP.NET Identity for the user management on your central login page.

like image 65
leastprivilege Avatar answered Sep 28 '22 04:09

leastprivilege