Security.Identity
Security.Identity copied to clipboard
Default role for new users
Hey, first of all thank you for this great library, I've got two quick questions , I've looked through the demo but I'm still unsure of the correct way to do this.
- How to set a default Role to new users , should this be done in a way similar to this or am I off?
- Users with a specified role do not inherit the claims of the role , is there a setting to turn this on?
Thanks in advance!
Update on question 1. currently added the following code to the Register function (in the controller) before fetching the JWT , seems to be working
await _userManager.AddToRoleAsync(user, "Customer");
with _userManager being
UserManager<IdentityUser> _userManager;