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

Make async token refresh mechanism #13

Merged
merged 10 commits into from
Feb 7, 2023
Merged

Make async token refresh mechanism #13

merged 10 commits into from
Feb 7, 2023

Conversation

jakobmygind
Copy link
Contributor

@jakobmygind jakobmygind commented Jan 3, 2023

This PR adds an async version of the existing token refresh mechanism including unit tests verifying

  1. A single api call with expired token refreshes tokens and subsequently completes the API call
  2. Several API calls being fired simultaneously with an expired token resulting in a single refresh and api calls finally completing
  3. Failing requests of different kinds

Also it now uses swift-dependencies for handling dependencies

Copy link
Contributor

@BucekJiri BucekJiri left a comment

Choose a reason for hiding this comment

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

This is great!

Copy link
Contributor

@elkraneo elkraneo left a comment

Choose a reason for hiding this comment

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

This looks like a great resource for a common problem. I especially like the tests.

@BucekJiri
Copy link
Contributor

Exactly as Cristian says. No need to worry about this anymore :)

@jakobmygind jakobmygind requested a review from elkraneo February 1, 2023 15:00
@jakobmygind jakobmygind merged commit e1c7ea1 into main Feb 7, 2023
@jakobmygind jakobmygind deleted the async_tokens branch February 7, 2023 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants