Skip to content

Add Login for Admin feature.#4022

Merged
brandonpage merged 5 commits intoforcedotcom:devfrom
brandonpage:login-for-admin
Apr 24, 2026
Merged

Add Login for Admin feature.#4022
brandonpage merged 5 commits intoforcedotcom:devfrom
brandonpage:login-for-admin

Conversation

@brandonpage
Copy link
Copy Markdown
Contributor

I want feedback as early as possible, but I will leave it in draft until there is adequate test coverage.

The trickiest part is probably handling cancelling the new option:

login_for_admin_cancel.mov

@github-actions
Copy link
Copy Markdown

1 Warning
⚠️ Static Analysis found an issue with one or more files you modified. Please fix the issue(s).

Clang Static Analysis Issues

File Type Category Description Line Col
SFOAuthCoordinator Nullability Memory error nil assigned to a pointer which is expected to have non-null value 120 19
SFOAuthCoordinator Nullability Memory error nil assigned to a pointer which is expected to have non-null value 244 15
SFUserAccountManager Nullability Memory error Null passed to a callee that requires a non-null 2nd parameter 1579 15
SFUserAccountManager Nullability Memory error Null passed to a callee that requires a non-null 2nd parameter 1594 15
SFUserAccountManager Nullability Memory error nil passed to a callee that requires a non-null 2nd parameter 2229 13

Generated by 🚫 Danger

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 21, 2026

TestsPassed ☑️SkippedFailed ❌️
SalesforceSDKCore iOS ^18 Test Results626 ran621 ✅5 ❌
TestResult
SalesforceSDKCore iOS ^18 Test Results
testMissingMyDomain()❌ failure
SFSDKAuthConfigUtilTests.testBrowserBasedLoginEnabled❌ failure
SFUserAccountManagerTests.testAuthHandler❌ failure
SalesforceRestAPITests.testCreateQuerySearchDelete❌ failure
SalesforceRestAPITests.testUploadOwnedFilesDelete❌ failure

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

❌ Patch coverage is 85.71429% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.24%. Comparing base (4d0d81f) to head (44e4d18).
⚠️ Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
...forceSDKCore/Classes/Login/SFLoginViewController.m 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #4022      +/-   ##
==========================================
- Coverage   70.42%   67.24%   -3.19%     
==========================================
  Files         246      253       +7     
  Lines       22326    22346      +20     
==========================================
- Hits        15724    15026     -698     
- Misses       6602     7320     +718     
Components Coverage Δ
Analytics 70.78% <ø> (ø)
Common 69.75% <ø> (-1.16%) ⬇️
Core 60.16% <85.71%> (-4.94%) ⬇️
SmartStore 74.59% <ø> (+1.39%) ⬆️
MobileSync 87.41% <ø> (-1.78%) ⬇️
Files with missing lines Coverage Δ
...lesforceSDKCore/Classes/OAuth/SFOAuthCoordinator.m 51.65% <100.00%> (-8.80%) ⬇️
...SalesforceSDKCore/Classes/OAuth/SFSDKAuthSession.m 91.42% <100.00%> (ø)
...SDKCore/Classes/UserAccount/SFUserAccountManager.m 54.36% <100.00%> (-6.21%) ⬇️
...forceSDKCore/Classes/Login/SFLoginViewController.m 70.44% <57.14%> (-4.14%) ⬇️

... and 112 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 21, 2026

TestsPassed ☑️SkippedFailed ❌️
SalesforceSDKCore iOS ^26 Test Results626 ran623 ✅3 ❌
TestResult
SalesforceSDKCore iOS ^26 Test Results
SFSDKAuthConfigUtilTests.testBrowserBasedLoginEnabled❌ failure
SalesforceRestAPITests.testCreateQuerySearchDelete❌ failure
SalesforceRestAPITests.testUpdateWithIfUnmodifiedSince❌ failure

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 21, 2026

TestsPassed ✅SkippedFailed
AuthFlowTester UI Test Results all1 ran1 ✅
TestResult
No test annotations available

@brandonpage brandonpage marked this pull request as ready for review April 22, 2026 01:03

// Validate
// Login for Admin always uses web server flow regardless of the useWebServerFlow setting
let effectiveUseWebServerFlow = loginForAdmin ? true : useWebServerFlow
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: could this be let effectiveUseWebServerFlow = loginForAdmin || useWebServerFlow?

@brandonpage brandonpage merged commit a1f4ec3 into forcedotcom:dev Apr 24, 2026
25 of 30 checks passed
brandonpage added a commit that referenced this pull request Apr 24, 2026
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