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] - Fix crash occurring on authentication fails after initial log-in #2742

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

LZRS
Copy link
Contributor

@LZRS LZRS commented Sep 11, 2023

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

Fixes crash occurring in cases of authentication fail after initial login by redirecting to log in in case of any error, and always checking a user's authorization everytime before running a sync

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

@LZRS LZRS self-assigned this Sep 11, 2023
@LZRS LZRS force-pushed the fix_subsequent_crash_on_keycloak_error branch from 88561c0 to 0a0330c Compare September 11, 2023 07:09
@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Merging #2742 (4f555b4) into mwcore-dev (c28e435) will increase coverage by 0.0%.
The diff coverage is 91.6%.

Impacted file tree graph

@@             Coverage Diff              @@
##             mwcore-dev   #2742   +/-   ##
============================================
  Coverage          67.6%   67.7%           
- Complexity          882     887    +5     
============================================
  Files               160     160           
  Lines              7153    7163   +10     
  Branches           1000    1001    +1     
============================================
+ Hits               4842    4853   +11     
- Misses             1681    1682    +1     
+ Partials            630     628    -2     
Flag Coverage Δ
engine 67.7% <91.6%> (+<0.1%) ⬆️

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

Files Changed Coverage Δ
...re/engine/data/remote/shared/TokenAuthenticator.kt 77.9% <86.2%> (+1.2%) ⬆️
...ister/fhircore/engine/auth/AccountAuthenticator.kt 73.9% <100.0%> (-0.6%) ⬇️
...rtregister/fhircore/engine/sync/SyncBroadcaster.kt 81.0% <100.0%> (+1.4%) ⬆️

... and 1 file with indirect coverage changes

@LZRS LZRS force-pushed the fix_subsequent_crash_on_keycloak_error branch from 0a0330c to 4f555b4 Compare September 11, 2023 08:17
@LZRS LZRS changed the title [MWCore] [WIP] - Fix crash occurring when keycloak fails after initial log-in [MWCore] - Fix crash occurring on authentication fails after initial log-in Sep 11, 2023
@LZRS LZRS marked this pull request as ready for review September 11, 2023 08:20
@LZRS LZRS requested a review from sevenreup September 11, 2023 08:20
@LZRS LZRS force-pushed the fix_subsequent_crash_on_keycloak_error branch from 4f555b4 to 962962a Compare September 11, 2023 08:49
@LZRS LZRS linked an issue Sep 11, 2023 that may be closed by this pull request
@LZRS LZRS merged commit 4acae2f into mwcore-dev Sep 13, 2023
4 checks passed
@LZRS LZRS deleted the fix_subsequent_crash_on_keycloak_error branch September 13, 2023 06:27
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.

App crashes on SocketTimeout when refreshing Keycloak token
2 participants