Skip to content

Ensure that the refresh token is only used within the expiration window#266

Merged
bachya merged 1 commit intodevfrom
single-refresh-token
Oct 7, 2021
Merged

Ensure that the refresh token is only used within the expiration window#266
bachya merged 1 commit intodevfrom
single-refresh-token

Conversation

@bachya
Copy link
Copy Markdown
Owner

@bachya bachya commented Oct 7, 2021

Describe what the PR does:

Previously, when a request would encounter a 401 backoff, the library would attempt to refresh the access token for each of those requests, often leading to collisions where the refresh token would become invalid. This PR ensures that backoff will only try the refresh token if the last time it was used is outside of the expiration window.

Does this fix a specific issue?

N/A

Checklist:

  • Confirm that one or more new tests are written for the new functionality.
  • Run tests and ensure everything passes (with 100% test coverage).
  • Update README.md and docs/ with any new documentation.
  • Add yourself to AUTHORS.md.

@bachya bachya added the bug Bugs or issues which will cause a problem for users label Oct 7, 2021
@bachya bachya self-assigned this Oct 7, 2021
@qlty-cloud-legacy

This comment has been minimized.

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 7, 2021

Codecov Report

Merging #266 (b803fa8) into dev (a8650ef) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##               dev      #266   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines          886       893    +7     
=========================================
+ Hits           886       893    +7     
Impacted Files Coverage Δ
simplipy/api.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8650ef...b803fa8. Read the comment docs.

@bachya bachya merged commit ebace76 into dev Oct 7, 2021
@bachya bachya deleted the single-refresh-token branch October 7, 2021 05:57
@github-actions github-actions bot locked and limited conversation to collaborators Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Bugs or issues which will cause a problem for users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant