Skip to content

Refactor how token refreshing works to be more resilient #4819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 29, 2025

Conversation

t3chguy
Copy link
Member

@t3chguy t3chguy commented Apr 28, 2025

  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

Fixes #4818
Fixes element-hq/element-web#29816

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: Michael Telatynski <[email protected]>
Signed-off-by: Michael Telatynski <[email protected]>
Signed-off-by: Michael Telatynski <[email protected]>
Signed-off-by: Michael Telatynski <[email protected]>
@t3chguy t3chguy marked this pull request as ready for review April 28, 2025 15:34
@t3chguy t3chguy requested a review from a team as a code owner April 28, 2025 15:34
@t3chguy t3chguy requested review from dbkr and florianduros April 28, 2025 15:34
Signed-off-by: Michael Telatynski <[email protected]>
@t3chguy t3chguy added this pull request to the merge queue Apr 29, 2025
Merged via the queue into develop with commit d67b19f Apr 29, 2025
36 checks passed
@t3chguy t3chguy deleted the t3chguy/token-refresh-clock branch April 29, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants