In ASP.Net Core1.0 RTM, I'm trying to create Identity using this method:
userManager.CreateIdentityAsync()
but I get this error:
'UserManager' doesnot contain a definition for 'CreateIdentityAsync'.
What is going wrong?
You can try IUserClaimsPrincipalFactory
ClaimsPrincipal claimsPrincipal = await _claimsPrincipalFactory.CreateAsync(user);
((ClaimsIdentity) claimsPrincipal.Identity).AddClaim(new Claim("user_id", user.Id.ToString()));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With