The AspNetUserLogins table Identity

asp.net-identity asp.net-mvc c# entity-framework

Accepted Answer

What is the purpose of AspNetUserLogins? The Identity system in Asp.net Identity utilizes theAspNetUserLogins table to store data about third-party or external logins, such as users who access your website through Google, Facebook, Twitter, etc. TheAspNetUsers table is the main table used to hold user data, and thus is related toAspNetUserLogins via UserId -> AspNetUsers.Id .

For instance, if a user accesses your website through Facebook, then theLoginProvider is the name of the service that gave the login; hence, in the case of "Facebook," theProviderKey is a special Facebook key connected to the Facebook user.

The Asp.net external authentication providers make use of this table.

Is it to keep track of user logins? No, it's not truly utilized as described above.

How can I then incorporate that data into this table? You don't need to change the information in this table because, typically, when a user signs in using an external provider, the provider returns aClaimsIdentity , a table that contains user claims, one of which is an external provider's unique user id that is automatically updated.

learn more about outside companies here

51
8/1/2017 12:57:53 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow