AddClaimAsync asynchronously attaches a custom claim to an ASP.NET Core Identity user. A registration handler can store a FullName claim after creating the user, then continue with email confirmation or sign-in. section 23.6
A practical registration flow is:
- Add a Name property to the registration input model and a matching field to the Razor view. section 23.6
- Protect later claim-management pages so users cannot change sensitive data such as their own permissions. section 23.6
Displaying the claim
After sign-in, retrieve the claim through the ClaimsPrincipal, for example with User.FindFirstValue("FullName") in a Razor view.
