diff --git a/IRaCIS.Core.API/Controllers/ExtraController.cs b/IRaCIS.Core.API/Controllers/ExtraController.cs index fe14a9a0b..b32bc67ab 100644 --- a/IRaCIS.Core.API/Controllers/ExtraController.cs +++ b/IRaCIS.Core.API/Controllers/ExtraController.cs @@ -444,18 +444,16 @@ namespace IRaCIS.Api.Controllers var opts = new RestClientOptions(baseUrl); using var client = new RestClient(opts); + //https://bump.sh/logto/doc/logto-management-api/authentication var request = new RestRequest("oidc/token", Method.Post); request .AddHeader("Content-Type", "application/x-www-form-urlencoded") .AddParameter("grant_type", "client_credentials") .AddParameter("client_id", appId) .AddParameter("client_secret", appSecret) - .AddParameter("resource", apiAddress); //必须在界面上配置 - - if (scope is not null) - { - request.AddParameter("scope", scope); - } + .AddParameter("resource", apiAddress) //注意这里默认值地址和api 地址有区别 + .AddParameter("scope", scope); + var response = await client.ExecuteAsync(request);