Skip to content

Fix Refresh Token Rotation.#2884

Merged
brandonpage merged 2 commits into
forcedotcom:devfrom
brandonpage:fix-rtr
May 15, 2026
Merged

Fix Refresh Token Rotation.#2884
brandonpage merged 2 commits into
forcedotcom:devfrom
brandonpage:fix-rtr

Conversation

@brandonpage
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

1 Warning
⚠️ libs/SalesforceSDK/src/com/salesforce/androidsdk/accounts/UserAccountManager.java#L109 - Do not place Android context classes in static fields (static reference to UserAccountManager which has field context pointing to Context); this is a memory leak

Generated by 🚫 Danger

Copy link
Copy Markdown
Contributor

@JohnsonEricAtSalesforce JohnsonEricAtSalesforce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.15%. Comparing base (7d8d3a0) to head (9558d9c).
⚠️ Report is 3 commits behind head on dev.

Files with missing lines Patch % Lines
...om/salesforce/androidsdk/accounts/UserAccount.java 66.66% 2 Missing and 4 partials ⚠️
...sforce/androidsdk/accounts/UserAccountManager.java 20.00% 4 Missing ⚠️
...esforce/androidsdk/auth/AuthenticationUtilities.kt 0.00% 3 Missing ⚠️
.../com/salesforce/androidsdk/rest/ClientManager.java 50.00% 0 Missing and 1 partial ⚠️

❌ Your patch check has failed because the patch coverage (50.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #2884      +/-   ##
============================================
+ Coverage     55.06%   55.15%   +0.08%     
- Complexity     2496     2504       +8     
============================================
  Files           226      226              
  Lines         17752    17775      +23     
  Branches       2316     2328      +12     
============================================
+ Hits           9775     9803      +28     
+ Misses         6978     6967      -11     
- Partials        999     1005       +6     
Components Coverage Δ
Analytics 48.71% <ø> (ø)
SalesforceSDK 41.90% <32.25%> (+0.20%) ⬆️
Hybrid 59.30% <ø> (ø)
SmartStore 78.19% <ø> (-0.02%) ⬇️
MobileSync 82.10% <ø> (-0.01%) ⬇️
React 51.50% <ø> (ø)
Files with missing lines Coverage Δ
.../com/salesforce/androidsdk/rest/ClientManager.java 62.06% <50.00%> (+0.44%) ⬆️
...esforce/androidsdk/auth/AuthenticationUtilities.kt 0.00% <0.00%> (ø)
...sforce/androidsdk/accounts/UserAccountManager.java 62.57% <20.00%> (-0.80%) ⬇️
...om/salesforce/androidsdk/accounts/UserAccount.java 44.03% <66.66%> (+1.17%) ⬆️

... and 6 files with indirect coverage changes

🚀 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.

… known to the SDK. Add getRefreshTokenForPersistance to handle account updates and storage.
Copy link
Copy Markdown
Contributor

@JohnsonEricAtSalesforce JohnsonEricAtSalesforce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

Copy link
Copy Markdown
Contributor

@wmathurin wmathurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Maybe new AuthFlowTester tests (in a separate PR if it makes the cherry-picking easier)?

@brandonpage
Copy link
Copy Markdown
Contributor Author

Unit patch coverage is actually far better than reported here, but miss calculated due to the failing unit test shard. That test issue is specific to dev so I cannot put it in this PR, which will be cherry picked to master.

@brandonpage brandonpage merged commit 11a4a43 into forcedotcom:dev May 15, 2026
13 of 20 checks passed
brandonpage added a commit that referenced this pull request May 15, 2026
* Fix Refresh Token Rotation.

* Update UserAccount.getRefreshToken to always return the latest values known to the SDK.  Add getRefreshTokenForPersistance to handle account updates and storage.
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.

3 participants