You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In osdctl, the code passes both the access token and the refresh token when calling connectionBuilder.Tokens. If in the code below, a long-lived offline access token is set as config.AccessToken and config.RefreshToken is set to an empty string (because it is not needed), the API will generate an error.
Get \"https://api.stage.openshift.com/api/clusters_mgmt/v1/clusters?search=omitted&size=50\": can't get access token: invalid_grant: Invalid refresh token
There may not be a reason to pass in the refresh token since the user of osdctl could log in again to generate a new temporary access token or only use the long-lived offline access token so I will likely propose that change on that repository. However, I personally believe it would be beneficial for the API to ignore empty tokens and the SDK to ignore (or warn) when passed empty strings.
I am willing to make that change to the SDK, but I wanted to ask the maintainers first so let me know your thoughts. Thank you.
The text was updated successfully, but these errors were encountered:
In osdctl, the code passes both the access token and the refresh token when calling
connectionBuilder.Tokens
. If in the code below, a long-lived offline access token is set asconfig.AccessToken
andconfig.RefreshToken
is set to an empty string (because it is not needed), the API will generate an error.There may not be a reason to pass in the refresh token since the user of osdctl could log in again to generate a new temporary access token or only use the long-lived offline access token so I will likely propose that change on that repository. However, I personally believe it would be beneficial for the API to ignore empty tokens and the SDK to ignore (or warn) when passed empty strings.
I am willing to make that change to the SDK, but I wanted to ask the maintainers first so let me know your thoughts. Thank you.
The text was updated successfully, but these errors were encountered: