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

fix(Auth): Throw error if hosted UI is not presented during sign out #3769

Merged
merged 6 commits into from
Jul 8, 2024

Conversation

harsh62
Copy link
Member

@harsh62 harsh62 commented Jul 3, 2024

Issue #

#3766

Description

The PR aims to fix a problem where if SignOut failed with HostedUI, it proceeded to clear local cache and complete irrespective of the error.

Going forward, if an error happens during HostedUI, the signOut will fail with an error and give the developer.

General Checklist

  • Added new tests to cover change, if needed
  • Build succeeds with all target using Swift Package Manager
  • All unit tests pass
  • All integration tests pass
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Documentation update for the change if required
  • PR title conforms to conventional commit style
  • New or updated tests include Given When Then inline code documentation and are named accordingly testThing_condition_expectation()
  • If breaking change, documentation/changelog update with migration instructions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
@harsh62 harsh62 temporarily deployed to IntegrationTest July 3, 2024 20:16 — with GitHub Actions Inactive
Copy link

codecov bot commented Jul 3, 2024

Codecov Report

Attention: Patch coverage is 38.88889% with 11 lines in your changes missing coverage. Please review.

Project coverage is 68.43%. Comparing base (6f65406) to head (931fa6a).
Report is 2 commits behind head on main.

Files Patch % Lines
...gin/StateMachine/CodeGen/Errors/SignOutError.swift 0.00% 9 Missing ⚠️
...hine/Resolvers/SignOut/SignOutState+Resolver.swift 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3769      +/-   ##
==========================================
- Coverage   68.47%   68.43%   -0.04%     
==========================================
  Files        1079     1079              
  Lines       37571    37578       +7     
==========================================
- Hits        25726    25717       -9     
- Misses      11845    11861      +16     
Flag Coverage Δ
API_plugin_unit_test 68.83% <ø> (-0.04%) ⬇️
AWSPluginsCore 68.56% <ø> (ø)
Amplify 47.68% <ø> (+0.03%) ⬆️
Analytics_plugin_unit_test 84.52% <ø> (ø)
Auth_plugin_unit_test 79.33% <38.88%> (-0.15%) ⬇️
DataStore_plugin_unit_test 81.27% <ø> (-0.02%) ⬇️
Geo_plugin_unit_test 72.00% <ø> (ø)
Logging_plugin_unit_test 62.95% <ø> (ø)
Predictions_plugin_unit_test 37.32% <ø> (ø)
PushNotifications_plugin_unit_test 86.21% <ø> (ø)
Storage_plugin_unit_test 76.75% <ø> (ø)
unit_tests 68.43% <38.88%> (-0.04%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@harsh62 harsh62 marked this pull request as ready for review July 4, 2024 19:27
@harsh62 harsh62 requested a review from a team as a code owner July 4, 2024 19:27
…ut/ShowHostedUISignOut.swift

Co-authored-by: Sebastian Villena <[email protected]>
…ut/ShowHostedUISignOut.swift

Co-authored-by: Sebastian Villena <[email protected]>
@harsh62 harsh62 merged commit 5684f34 into main Jul 8, 2024
78 checks passed
@harsh62 harsh62 deleted the 3766-hosted-ui-logout-issue branch July 8, 2024 19:04
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.

2 participants