Skip to content
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

Add matrix 1.3 api feature to refresh access token #294

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dalees
Copy link

@dalees dalees commented Oct 16, 2024

  • Refresh tokens are returned by the Matrix homeserver when ReqLogin.RefreshToken is set.
  • Add new functions to client for Refresh() which uses a previously stored refresh token to update the existing access token once it expires.
  • Implements a fudge factor on the expiry duration so we refresh well before the access token expires.

* Refresh tokens are returned by the Matrix homeserver when
  ReqLogin.RefreshToken is set.
* Add new functions to client for Refresh() which uses a previously
  stored refresh token to update the existing access token once it expires.
* Implements a fudge factor on the expiry duration so we refresh well before
  the access token expires.
@dalees
Copy link
Author

dalees commented Oct 16, 2024

Happy for suggestions of changes to the interface and naming of Refresh and refreshInner functions - it made sense to me to provide some utility that could be called frequently without knowledge of the refresh time internals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant