Skip to content

Commit

Permalink
docs(oauth): document refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
jwulf committed Mar 26, 2024
1 parent 7707dd6 commit e83573d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,12 @@ const c8 = new Camunda8({

If the cache directory does not exist, the SDK will attempt to create it (recursively). If the SDK is unable to create it, or the directory exists but is not writeable by your application then the SDK will throw an exception.

### Token refresh

Token refresh timing relative to expiration is controlled by the `CAMUNDA_OAUTH_TOKEN_REFRESH_THRESHOLD_MS` value. By default this is 1000ms. Tokens are renewed this amount of time before they expire.

If you experience intermittent `401: Unauthorized` errors, this may not be sufficient time to refresh the token before it expires in your infrastructure. Increase this value to force a token to be refreshed before it expires.

## Connection Configuration Examples

### Self-Managed
Expand Down

0 comments on commit e83573d

Please sign in to comment.