Skip to content
Snippets Groups Projects
Unverified Commit d67b19fa authored by Michael Telatynski's avatar Michael Telatynski Committed by GitHub
Browse files

Refactor how token refreshing works to be more resilient (#4819)


* Refactor how token refreshing works to be more resilient

1. ensure we do use the new token if it is not explicitly inhibited by the caller
2. eagerly refresh token if we know it is expired
3. allow refreshing a token multiple times if e.g. on bad connection or the environment has been slept and sufficient time has passed since the last refresh attempt

Signed-off-by: default avatarMichael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: default avatarMichael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: default avatarMichael Telatynski <7t3chguy@gmail.com>

* Add exponential backoff

Signed-off-by: default avatarMichael Telatynski <7t3chguy@gmail.com>

* Ensure no timing effects on `authedRequest` method call

Signed-off-by: default avatarMichael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: default avatarMichael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: default avatarMichael Telatynski <7t3chguy@gmail.com>
parent 6ec200ad
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment