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

[MWCore] Update refresh token to avoid reuse of stale refresh token #2959

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

LZRS
Copy link
Contributor

@LZRS LZRS commented Jan 9, 2024

Stale refresh token on expiry leads to requests raising 401 and sync failing

IMPORTANT: Where possible all PRs must be linked to a Github issue

Fixes #2958

Engineer Checklist

  • I have written Unit tests for any new feature(s) and edge cases for bug fixes
  • I have added any strings visible on UI components to the strings.xml file
  • I have updated the CHANGELOG.md file for any notable changes to the codebase
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the project's style guide
  • I have built and run the FHIRCore app to verify my change fixes the issue and/or does not break the app
  • I have checked that this PR does NOT introduce breaking changes that require an update to Content and/or Configs? If it does add a sample here or a link to exactly what changes need to be made to the content.

Code Reviewer Checklist

  • I have verified Unit tests have been written for any new feature(s) and edge cases
  • I have verified any strings visible on UI components are in the strings.xml file
  • I have verifed the CHANGELOG.md file has any notable changes to the codebase
  • I have verified the solution has been implemented in a configurable and generic way for reuseable components
  • I have built and run the FHIRCore app to verify the change fixes the issue and/or does not break the app

Stale refresh token on expiry leads to requests raising 401 and sync failing
@LZRS LZRS self-assigned this Jan 9, 2024
Copy link

codecov bot commented Jan 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ba88193) 68.3% compared to head (f0ac79c) 68.3%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             mwcore-dev   #2959   +/-   ##
============================================
  Coverage          68.3%   68.3%           
  Complexity          901     901           
============================================
  Files               164     164           
  Lines              7345    7346    +1     
  Branches           1037    1037           
============================================
+ Hits               5020    5021    +1     
  Misses             1667    1667           
  Partials            658     658           
Flag Coverage Δ
engine 68.3% <100.0%> (+<0.1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...ister/fhircore/engine/auth/AccountAuthenticator.kt 73.9% <100.0%> (ø)
...re/engine/data/remote/shared/TokenAuthenticator.kt 77.5% <100.0%> (+0.1%) ⬆️

@calmwalija calmwalija marked this pull request as ready for review January 11, 2024 11:10
@calmwalija calmwalija self-requested a review January 11, 2024 11:10
@calmwalija calmwalija merged commit 2df2764 into mwcore-dev Jan 11, 2024
4 checks passed
@calmwalija calmwalija deleted the mwcore-update-refresh-token branch January 11, 2024 11:10
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