Merged
Conversation
The CLI makes the user go through the oauth login authorization flow every
time the access token expired. The access tokens are short-lived and
expiration is currently set to 1 hour which requires the user to
re-login almost every time they are using the CLI.
Taking advantage of the refresh token support in the Identity Server to
automatically renew access tokens for the user. If there is a valid
refresh token, there is no action required by the user.
In case the refresh token expired or the renewal of the access token
fails for any other reason, the user is required to login again.
Implementation:
- Automatically adding the offline_access scope during the oauth flow so
that the Identity Server returns a refresh token.
- Caching the refresh token using the cache package similar to access
tokens.
- Added new configuration parameter `offlineAccess` to disable refresh
token support, e.g.
```
- name: default
organization: <your-org>
tenant: defaulttenant
auth:
offlineAccess: false
```
- Extended debug logging to log identity server requests and responses
as well as detailed log messages for refresh token and access token
handling. Redacting the client secret and refresh tokens to avoid them
being accidentally leaked
Implements #193
radu-iviniciu
approved these changes
May 22, 2025
Closed
vorflux bot
pushed a commit
to sankeerthrao/uipathcli
that referenced
this pull request
Apr 10, 2026
Add support for refresh tokens
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CLI makes the user go through the oauth login authorization flow every time the access token expired. The access tokens are short-lived and expiration is currently set to 1 hour which requires the user to re-login almost every time they are using the CLI.
Taking advantage of the refresh token support in the Identity Server to automatically renew access tokens for the user. If there is a valid refresh token, there is no action required by the user.
In case the refresh token expired or the renewal of the access token fails for any other reason, the user is required to login again.
Implementation:
Automatically adding the offline_access scope during the oauth flow so that the Identity Server returns a refresh token.
Caching the refresh token using the cache package similar to access tokens.
Added new configuration parameter
offlineAccessto disable refresh token support, e.g.Implements #193