使用下面的 C# 代码用 refresh token 刷新 access token
var httpClient = _httpClientFactory.CreateClient();
var parameters = new FormUrlEncodedContent(new Dictionary<string, string>
{
["client_id"] = _apiOptions.ClientId,
["client_secret"] = _apiOptions.ClientSecret,
["grant_type"] = "refresh_token",
["refresh_token"] = _memoryCache.Get<string>(nameof(TokenResponse.RefreshToken))
});
var response = await httpClient.PostAsync($"{_apiOptions.OauthUrl}/connect/token", parameters);
错误响应是
{"error":"invalid_request"}
请问如何解决?
是 refresh_token
的值为空引起的