Implementing a custom Identity storage provider and authentication in .NET Core

Vivek Ayer 1 Reputation point
2021-11-02T10:10:05.76+00:00

I'm trying to implement a custom identity storage provider that can talk to an existing SQL Server database that has bespoke user and role tables.

I have seen all the documentation I can find on implementing the various interfaces.
https://learn.microsoft.com/en-us/aspnet/core/security/authentication/identity-custom-storage-providers?view=aspnetcore-5.0

Looking first to implement the most essential ones so a user can login from a .NET core web app and the system can issue auth cookie identify the user's roles.

Is there an example project that I can look at that implements this? The User and Role stores look straight forward but I'm struggling with the custom DB Context implementation and how it can talk to my database. Also looking for more info on changes to the Startup class of my .NET Core web app and login page that will talk to my custom Identity provider.

Cheers

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,207 questions
{count} votes