-
Bug
-
Resolution: Done
-
Undefined
-
None
Before reporting an issue
[x] I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
admin/client-js
Describe the bug
The Node.js admin client obtain an initial access token, but does not check or refresh this token later. This will cause issues when using the admin client for a longer period of time.
As an example this causes the Account E2E tests to be flaky as they sometimes can take longer to execute than the validity of the token. Especially in private repositories.
Version
main
Regression
[ ] The issue is a regression
Expected behavior
Admin client automatically refreshes the access token if it is close to expiring. A default of 5 seconds minimum validity would be sensible.
Actual behavior
The admin client never refreshes the access token. A custom token provider can be used to do this, but that is not easy to implement.
How to Reproduce?
Run Account E2E tests in a private repository, or simple call auth then wait for more than 5 minutes before calling any operations through the admin endpoints.
Anything else?
No response
- links to