Skip to content

Remove redundant biometric auto-present from SFLoginViewController.#4044

Merged
sfdctaka merged 1 commit into
forcedotcom:devfrom
sfdctaka:biometricOption2
May 28, 2026
Merged

Remove redundant biometric auto-present from SFLoginViewController.#4044
sfdctaka merged 1 commit into
forcedotcom:devfrom
sfdctaka:biometricOption2

Conversation

@sfdctaka
Copy link
Copy Markdown
Contributor

Summary

  • Removes redundant biometric auto-presentation code from SFLoginViewController.viewDidLoad (lines 95-97)
  • BiometricAuthenticationManagerInternal.lock() now serves as the single source of truth for auto-presenting biometric unlock
  • The removed code did not respect the automaticPresentation flag introduced in PR Add option to automatically present biometric opt-in and lock  #4041

Context

PR #4041 added automaticPresentation to lock() which auto-presents biometric on all connected scenes. SFLoginViewController had its own independent auto-present logic that predated this and didn't check automaticPresentation. With automaticPresentation defaulting to true, both paths produced the same behavior — consolidating into lock() ensures the flag is always respected.

Test plan

  • All 15 BiometricAuthenticationManagerTests pass
  • Manual: webview login app with biometric policy + user opted in → biometric prompt still auto-presents on lock
  • Manual: set automaticPresentation = false → biometric prompt does NOT auto-present (user must tap button)
  • Manual: biometric button on login screen still works when tapped manually

@github-actions
Copy link
Copy Markdown

TestsPassed ☑️SkippedFailed ❌️
SalesforceSDKCore iOS ^18 Test Results639 ran633 ✅6 ❌
TestResult
SalesforceSDKCore iOS ^18 Test Results
testMalformedCallbackURL()❌ failure
SFSDKAuthConfigUtilTests.testBrowserBasedLoginEnabled❌ failure
SFUserAccountManagerTests.testUserAccountEncoding❌ failure
SalesforceRestAPITests.testCreateQuerySearchDelete❌ failure
SalesforceRestAPITests.testCreateUpdateQuerySearchDelete❌ failure
SalesforceRestAPITests.testUpdateWithIfUnmodifiedSince❌ failure

@github-actions
Copy link
Copy Markdown

TestsPassed ☑️SkippedFailed ❌️
SalesforceSDKCore iOS ^26 Test Results639 ran634 ✅5 ❌
TestResult
SalesforceSDKCore iOS ^26 Test Results
testSpecialCharactersInLoginHint()❌ failure
SFOAuthCoordinatorTests.testMigrateRefreshTokenSetup❌ failure
SFSDKAuthConfigUtilTests.testBrowserBasedLoginEnabled❌ failure
SalesforceRestAPITests.testBlockUpdate❌ failure
SalesforceRestAPITests.testCreateQuerySearchDelete❌ failure

@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.24%. Comparing base (d73eb2a) to head (6c5ade7).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #4044      +/-   ##
==========================================
+ Coverage   68.18%   68.24%   +0.05%     
==========================================
  Files         245      245              
  Lines       21467    21465       -2     
==========================================
+ Hits        14638    14649      +11     
+ Misses       6829     6816      -13     
Components Coverage Δ
Analytics 70.78% <ø> (ø)
Common 70.79% <ø> (ø)
Core 61.72% <ø> (+0.08%) ⬆️
SmartStore 73.44% <ø> (ø)
MobileSync 88.79% <ø> (ø)
Files with missing lines Coverage Δ
...forceSDKCore/Classes/Login/SFLoginViewController.m 71.02% <ø> (+0.97%) ⬆️

... and 2 files with indirect coverage changes

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

@sfdctaka sfdctaka requested review from bbirman and wmathurin May 27, 2026 23:55
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

TestsPassedSkippedFailed ❌️
AuthFlowTester UI Test Results all1 ran1 ❌
TestResult
AuthFlowTester UI Test Results all
AuthFlowTesterUITests.xctest
LegacyLoginTests.testCAOpaque_DefaultScopes_WebServerFlow()❌ failure

@sfdctaka sfdctaka merged commit 03f1d18 into forcedotcom:dev May 28, 2026
24 of 30 checks passed
@sfdctaka sfdctaka deleted the biometricOption2 branch May 28, 2026 20:20
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