.NET Core Identity vs IdentityServer4

ferdinand picture ferdinand · Jan 20, 2018 · Viewed 10k times · Source

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.

Answer

leastprivilege picture leastprivilege · Jan 21, 2018

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.