Authorize api and identity pages

I try to authorize by role Identity pages and API controllers and it doesn't work as expected.
I use Identity for security and i want to authorize the identity register page by role i want to authorize api controllers also.
If I use just this code, I can authorize identy pages:
services.AddAuthentication().AddIdentityServerJwt();
But if i use this code:
services.AddAuthentication(options => { options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; options.DefaultScheme = JwtBearerDefaults.AuthenticationScheme; options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; }) .AddJwtBearer(options => {}.AddIdentityServerJwt()
I can authorize api but I can't authorize identity page. Does anyone has any ideea how can I authorize both?