matrix-org / matrix-org/matrix-rust-sdk

Add support for Preemptive token refresh

Open
#2,419 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
2.3k
Forks
500
Avg merge
1d 16h
Merged PRs (30d)
106

Description

The current implementation of token refresh doesn't take the expiry date into account, instead waiting until a request fails and only then refreshing the token.

It would be smoother for the refresh to be made in advance of expiration to reduce the use of expired tokens.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the existing token refresh implementation and how token expiry dates are represented and checked. Determine where refresh currently follows a failed request, then define and implement the advance-refresh behavior; done means valid tokens are refreshed before expiry without waiting for a request failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
authentication
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.