title: How do I add custom user claims in JWT and user principal when using Microsoft.AspNetCore.ApiAuthorization.IdentityServer
body: <p>I'm using the new React template, which is part of the .NET Core 3 release. This template uses <code>Microsoft.AspNetCore.ApiAuthorization.IdentityServer</code> to integrate ASP.NET Core Identity, IdentityServer and React for user registration, authentication and authorization.</p>
  
  <p>This works really well for simple scenarios, but I find the documentation for a bit more complex scenarios confusing. This is mainly because there are a lot of different cogs now, and it's hard to figure out where to look.</p>
  
  <p>What I want to do is the following: I want to add a custom claim to the user (say, <code>IsAdmin: true</code>). This claim should be available in the .NET Core HttpContext in the ApiController (as part of the user's claim principal) for auth purposes, and it should be somewhere that React can read this claim (this would probably be the identitytoken/jwt), to provide a good user experience.</p>
  
  <p>What would be a good way to accomplish this?</p>