Reputation: 576
I am looking at adding OpenID Connect support to an existing ASP.NET Core application which uses ASP.NET Core Identity and a local SQL database of users. These users have profiles within the application and have multiple database tables linked to them, such as events and items that they created.
My question is, is there a recommended way to ensure that when the user authenticates via Azure AD using OpenID Connect, they become associated in some way to the existing user that is in the AspNetUsers database table?
Upvotes: 5
Views: 1983
Reputation: 19921
See this article Persist additional claims and tokens from external providers in ASP.NET Core. It describes how you can lookup and map local user claims with the external user.
Upvotes: 3