Skip to content

Conversation

ekjotmultani
Copy link
Member

@ekjotmultani ekjotmultani commented Sep 12, 2025

Issue #

Description

The integration test testSuccessfulForceSessionFetch was failing with the current implementation of the feature due to setting refresh tokens in Amplify to nil if returned that from the API, even though this is an invalid state for us. This PR fixes that by re using the old token in this case which is what is expected in the USER_SRP flow.

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.

Copy link

codecov bot commented Sep 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.20%. Comparing base (fa5907b) to head (74a9d88).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #4055       +/-   ##
===========================================
+ Coverage   67.77%   85.20%   +17.43%     
===========================================
  Files        1129       14     -1115     
  Lines       52473      453    -52020     
===========================================
- Hits        35562      386    -35176     
+ Misses      16911       67    -16844     
Flag Coverage Δ
API_plugin_unit_test ?
AWSPluginsCore ?
Amplify ?
Analytics_plugin_unit_test 85.20% <ø> (ø)
Auth_plugin_unit_test ?
DataStore_plugin_unit_test ?
Geo_plugin_unit_test ?
Logging_plugin_unit_test ?
Predictions_plugin_unit_test ?
PushNotifications_plugin_unit_test ?
Storage_plugin_unit_test ?
unit_tests 85.20% <ø> (+17.43%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ekjotmultani ekjotmultani marked this pull request as ready for review September 15, 2025 20:49
@ekjotmultani ekjotmultani requested a review from a team as a code owner September 15, 2025 20:49
@ekjotmultani ekjotmultani changed the title Feat/refresh token rotation chore(auth): Refresh Token Rotation Test Fix Sep 15, 2025
@harsh62 harsh62 merged commit 95b4b91 into main Sep 16, 2025
208 of 218 checks passed
@harsh62 harsh62 deleted the feat/refresh_token_rotation branch September 16, 2025 14:08
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