Now that i have my .NET Core app running in 2.0 - everything seems to work fine - I can login with my social providers, and verify the info I want to capture is on the Auth0 dashboard.
But the issue is when I debug. I cannot find the claims from the ClaimsPrincipal like I did in .NET Core 1.1. So is there a new way to query this information? I cant find anything in the docs.
@grpiccoli - Thanks for the answer. Could you maybe elaborate more? Is ApplicationUser an Auth0 “recommended” model, because i made a ‘CustomerUser’ model, and this is the setup.
public class CustomUser
{
[Key]
public int UserId { get; set; }
public string Email { get; set; }
public string AccountNumberString { get; set; }
public string FullName { get; set; }
public string ProfileImage { get; set; }
public virtual void Update(CustomUser cu)
{
UserId = cu.UserId;
Email = cu.Email;
AccountNumberString = cu.AccountNumberString;
FullName = cu.FullName;
ProfileImage = cu.ProfileImage;
}
}
My issue is when I’m trying to copy that data from the ClaimsPrincipal, It is not showing up. But the Auth0 dashboard shows that the data is still there. So I am wondering how to query through the object to get my data. Does that make sense?
Thanks again
Edit- From the ClaimsPrincipal.cs
//
// Summary:
// Gets a collection that contains all of the claims from all of the claims identities
// associated with this claims principal.
//
// Returns:
// The claims associated with this principal.
public virtual IEnumerable<Claim> Claims { get; }
Try to call the MapJsonKey function in order to map custom fields from userinfo endpoint in your OpenIdConnect authentication configuration in startup class