Rikai no hōhō
Rikai no hōhō

Reputation: 837

ASP.NET Core Identity SPA with React

I am confused and a bit lost about using ASP.NET Core Identity with a React SPA.

I have read Microsoft documentation about ASP.NET Core Identity several times, mostly focusing on the Identity with SPA section, and yet I have to confess I still don't clearly get how to bond a React SPA with ASP.NET Core Identity.

These are the blockers I have stumbled upon:

Any tutorial, blog, repository or documentation you can recommend me to understand exactly step-by-step thouroughfully explained what is needed to do to bond a React SPA with ASP.NET Core Identity? That is authenticating users, securing API endpoints, how React will communicate with Openiddict, and how to use Openiddict with ASP.NET Core Identity, etc.

Upvotes: 25

Views: 2195

Answers (2)

Mahmood
Mahmood

Reputation: 190

ASP.NET Identity is a membership provider and uses cookies while IdentityServer is an OAuth2/OpenID Connect server you can use to support token authentication. IdentityServer4 will eventually support ASP.NET Identity as a membership store. For authentication and authorization in mobile devices and SPA, you can use tokens and the best solution is IdentityServer4 with ASP.NET Identity.

Upvotes: 0

Abdul Rahim Bajwa
Abdul Rahim Bajwa

Reputation: 11

OpenIddict is a library to implement Auth server yourself and IdentityServer is a fully implemented Authentication server that providers several schemes. On tutorial, there aren't many tutorials that go through this scenario. Most go on creating JWT authentication and authorization using APS.NET Identity which to me feels a little insecure as you are implementing everything yourself and Auth is one of the things which you shouldn't implement yourself.

Upvotes: 0

Related Questions