PatrickS PatrickS - 4 years ago 322
C# Question

IdentityServer 4 and pre-existing SQL server databases

Is it possible to set up Identity server so that it not only looks at a SQL database when it comes to user records, but uses a pre-existing database that contains all the details? How would I go about configuring Identity Server to look at certain tables and fields within a database?

Answer Source

Yes you can implement your own IProfileService which has your UserDbContext or UserRepository injected into it. Make sure you add this service to the DI container for it to work. IdentityServer4 will your implementation of IProfileService if you do this.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download