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

OIDC: refresh tokens #3764

Merged
merged 50 commits into from
Oct 11, 2023
Merged

OIDC: refresh tokens #3764

merged 50 commits into from
Oct 11, 2023

Conversation

kerryarchibald
Copy link
Contributor

@kerryarchibald kerryarchibald commented Oct 2, 2023

For element-hq/element-web#25839
Includes #3765 #3769
With matrix-org/matrix-react-sdk#11699

  • adds refreshToken and tokenRefreshFunction to HttpApi.opts and client creation
  • attempts token refresh once when encountering a token error
  • retries request after token refresh

Checklist

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

Here's what your changelog entry will look like:

✨ Features

@kerryarchibald kerryarchibald mentioned this pull request Oct 2, 2023
3 tasks
@@ -112,8 +112,9 @@ export class FetchHttpApi<O extends IHttpOpts> {
*
* @param body - The HTTP JSON body.
*
* @param opts - additional options. If a number is specified,
* this is treated as `opts.localTimeoutMs`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was not true before these changes, just tidying up.

@kerryarchibald kerryarchibald changed the title [WIP] OIDC: refresh tokens OIDC: refresh tokens Oct 10, 2023
@kerryarchibald kerryarchibald marked this pull request as ready for review October 10, 2023 02:08
@kerryarchibald kerryarchibald requested a review from a team as a code owner October 10, 2023 02:08
Copy link
Contributor

@germain-gg germain-gg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty sane, thank you

@kerryarchibald kerryarchibald added this pull request to the merge queue Oct 11, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 11, 2023
@kerryarchibald kerryarchibald added this pull request to the merge queue Oct 11, 2023
Merged via the queue into develop with commit 0f4fa5a Oct 11, 2023
21 checks passed
@kerryarchibald kerryarchibald deleted the kerry/token-refresh-poc branch October 11, 2023 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants