Well, the answer until some code is provided is "it depends", but I will try. Yesterday I did a similar research, so it's kinda fresh knowledge. As a prerequisite I created a fresh Razor pages project and went through these tutorials for different providers.
Firstly, different providers will give you different data. For instance, without any additional configuration you'll get first and last names only from Facebook and Google. In order to get the name from Twitter you'll need to manually add the claim
.AddTwitter(options =>
{
options.ConsumerKey = Configuration["Authentication:Twitter:ConsumerKey"];
options.ConsumerSecret = Configuration["Authentication:Twitter:ConsumerSecret"];
options.RetrieveUserDetails = true;
options.ClaimActions.MapJsonKey(ClaimTypes.GivenName, "name");
})
or somehow handle the CreatingTicket event. Problems won't stop here. In Twitter they don't distinguish the first and last names, so it's just Name. And icing on the cake: in Twitter and Google you can erase your name so you won't get any data in that case.
Secondly, keeping the data. I think one can simply follow the approach suggested in article already mentioned and save claims and/or extend the IdentityUser class, which I believe is your case. I put the user update call where they saved the claims, in the OnPostConfirmationAsync:
if (result.Succeeded) {
// Save claims. This will populate AspNetUserClaims table
await _userManager.AddClaimsAsync(user,
new []
{
info.Principal.FindFirst(ClaimTypes.GivenName),
info.Principal.FindFirst(ClaimTypes.Surname)
});
// AND/OR save user. This will populate the AspNetUsers table
user.FirstName = info.Principal.FindFirst(ClaimTypes.GivenName).Value;
user.LastName = info.Principal.FindFirst(ClaimTypes.Surname).Value;
await _userManager.UpdateAsync(user);
...
}
Hope that helps.