flyctl icon indicating copy to clipboard operation
flyctl copied to clipboard

token refresh improvements

Open wjordan opened this issue 9 months ago • 0 comments

Two changes to improve token-refresh behavior in the client:

  1. First try a Tokens.update without the UserURLCallback option (which can now fetch tokens in parallel), and then retry with the UserURLCallback option only if the first attempt returned any errors.
  2. Adjust the (now-configurable) advancePrune duration (from the default 1 minute) so the foreground thread has an advance-prune duration of 30 seconds while the background thread has 2 minutes. This should make it more likely for tokens to be refreshed in the background rather than delay foreground operations.

wjordan avatar Mar 28 '25 23:03 wjordan