Please I need assistance in implementing a custom way of assigning claims to authenticated users. On successful login,
var result = await SignInManager.Pass
The Claim property from IdentityUser gives you an ICollection with that collection you can call the following C# method:
public string GetCustomClaimValue(ICollection claimCollection, string customClaimType)
{
string claimValue = "";
foreach (IdentityUserClaim claim in claimCollection)
{
if (claim.ClaimType == customClaimType)
{
claimValue = claim.ClaimValue;
break;
}
}
return claimValue;
}