C#.NET Core托管Blazor WebAssembly-向{ProjectName} .ServerAPI添加其他客户端访问权限

I have a .NET Core hosted Blazor WebAssembly app from the default Microsoft template using the Microsoft.AspNetCore.ApiAuthorization.IdentityServer package.


I have tried registering the client in a separate Config.cs file as you would do with a typical IdentityServer4 project:

public static IEnumerable<IdentityServer4.Models.Client> Clients =>
        new List<IdentityServer4.Models.Client>
            new IdentityServer4.Models.Client
                ClientId = "web_id",
                ClientSecrets = { new Secret("web_id".ToSha256()) },
                AllowedGrantTypes = GrantTypes.ClientCredentials,
                AllowedScopes = { "WebAssemblyTest.ServerAPI" }


            .AddApiAuthorization<ApplicationUser, ApplicationDbContext>();


enter image description here

Accoring to microsoft Blazor WebAssembly docs, the "WebAssemblyTest.ServerAPI" is registered using the AddIdentityServerJwt() in startup so I have no idea how to get this working.