Skip to content

Deprecate IDP (Identity Provider) login flow - #4151

Merged
sfdctaka merged 2 commits into
forcedotcom:devfrom
sfdctaka:deprecate-idp-flow
Aug 29, 2026
Merged

Deprecate IDP (Identity Provider) login flow#4151
sfdctaka merged 2 commits into
forcedotcom:devfrom
sfdctaka:deprecate-idp-flow

Conversation

@sfdctaka

Copy link
Copy Markdown
Contributor

Summary

Marks the IDP (Identity Provider) login flow public API as deprecated (deprecated in 14.0, targeted for removal in 15.0).

As Mobile SDK moves to advanced (browser-based) authentication as the default and only auth mechanism, the IDP flow — where one app acts as an identity provider so other "service provider" apps on the device log in without their own browser round-trip — is being retired. There is no drop-in replacement; apps should move to advanced (browser-based) authentication.

This PR only adds deprecation annotations. It does not remove the flow or change any runtime behavior — IDP keeps working in 14.0. App developers now get a compiler deprecation warning one major release ahead of removal.

What changed

  • SFSDK_DEPRECATED(14.0, 15.0, …) (Obj-C) / @available(*, deprecated, …) (Swift) on the public IDP entry points:
    • SalesforceManager (SalesforceSDKManager): isIdentityProvider, identityProviderURLScheme, loginFlowSelectionViewProvider, idpUserSelectionViewProvider
    • UserAccountManager (SFUserAccountManager): the IDP members (isIdentityProvider, isIDPEnabled, idpAppURIScheme, idpLoginFlowSelectionAction, idpUserSelectionAction, IDP response/command handlers, kickOffIDPInitiatedLoginFlowForSP)
    • SPConfig, SFOAuthCoordinator IDP methods, the IDP UI classes, and SFManagedPreferences.idpAppURLScheme
  • The SDK's own internal usages are routed around the annotations (non-deprecated sdk_-prefixed accessors over the same backing storage), and implementations of the deprecated methods/accessors are wrapped with -Wdeprecated-implementations pragmas — so the SDK still builds warning-clean.

Notes

  • Mirrors the useWebServerAuthentication (OAuth user agent flow) deprecation landed the same release.
  • Annotation-only, no behavior change. SalesforceSDKCore builds with zero -Wdeprecated-declarations / -Wdeprecated-implementations warnings.
  • Public API surface change — flagging for human review per the repo's escalation policy.
  • Companion Android PR marks the equivalent Android IDP surface deprecated.

Test

  • xcodebuild build -scheme SalesforceSDKCore → BUILD SUCCEEDED, warning-clean for the touched files.

Mark the IDP login flow's public API as deprecated (deprecated in 14.0,
targeted for removal in 15.0). As Mobile SDK moves to advanced
(browser-based) authentication as the default and only auth mechanism,
the IDP flow — where one app acts as an identity provider so other
service-provider apps log in without their own browser round-trip — is
being retired. There is no drop-in replacement; apps should use advanced
(browser-based) authentication.

This change only adds deprecation annotations. It does not remove the
flow or change any runtime behavior — IDP keeps working in 14.0.

- SFSDK_DEPRECATED(14.0, 15.0, ...) / @available(*, deprecated) on the
  public IDP entry points: SalesforceSDKManager (isIdentityProvider,
  identityProviderURLScheme, loginFlowSelectionViewProvider,
  idpUserSelectionViewProvider), UserAccountManager IDP members,
  SPConfig, SFOAuthCoordinator IDP methods, the IDP UI classes, and
  SFManagedPreferences.idpAppURLScheme.
- Internal usages routed around the annotations (non-deprecated sdk_
  accessors) and implementations wrapped with -Wdeprecated-implementations
  pragmas so the SDK still builds warning-clean.

Mirrors the useWebServerAuthentication (OAuth user agent flow)
deprecation landed the same release.
@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
SFManagedPreferences Nullability Memory error nil returned from a method that is expected to return a non-null value 128 5
SFManagedPreferences Nullability Memory error nil returned from a method that is expected to return a non-null value 139 5
SFSDKAuthPreferences Nullability Memory error nil passed to a callee that requires a non-null 1st parameter 79 36
SFUserAccountManager Nullability Memory error Null passed to a callee that requires a non-null 2nd parameter 1778 15
SFUserAccountManager Nullability Memory error Null passed to a callee that requires a non-null 2nd parameter 1793 15
SFUserAccountManager Nullability Memory error nil passed to a callee that requires a non-null 1st parameter 2471 21
SFUserAccountManager Nullability Memory error nil passed to a callee that requires a non-null 2nd parameter 2695 13
SalesforceSDKManager Nil value used as mutex for @synchronized() (no synchronization will occur) Logic error Nil value used as mutex for @synchronized() (no synchronization will occur) 171 5
SalesforceSDKManager Nil value used as mutex for @synchronized() (no synchronization will occur) Logic error Nil value used as mutex for @synchronized() (no synchronization will occur) 183 5

Generated by 🚫 Danger

@github-actions

Copy link
Copy Markdown
TestsPassed ☑️SkippedFailed ❌️
SalesforceSDKCore iOS ^18 Test Results1009 ran1007 ✅2 ❌
TestResult
SalesforceSDKCore iOS ^18 Test Results
AuthFlowTypesViewTests.testAuthFlowTypesViewRendersSuccessfully()❌ failure
BiometricAdvancedAuthGateTests.test_awaitSceneActivation_resolvesOnActivationNotification()❌ failure

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 40.54054% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.39%. Comparing base (7fb2f46) to head (b1b8a98).
⚠️ Report is 10 commits behind head on dev.

Files with missing lines Patch % Lines
...ore/Classes/IDP/SFUserAccountManager+URLHandlers.m 0.00% 9 Missing ⚠️
...lasses/IDP/SFSDKUserSelectionTableViewController.m 0.00% 4 Missing ⚠️
...SDKCore/Classes/UserAccount/SFUserAccountManager.m 63.63% 4 Missing ⚠️
...forceSDKCore/Classes/Common/SalesforceSDKManager.m 60.00% 2 Missing ⚠️
...lesforceSDKCore/Classes/OAuth/SFOAuthCoordinator.m 0.00% 2 Missing ⚠️
...forceSDKCore/Classes/Login/SFLoginViewController.m 50.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (40.54%) 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    #4151      +/-   ##
==========================================
- Coverage   70.37%   67.39%   -2.99%     
==========================================
  Files         254      254              
  Lines       22849    22887      +38     
==========================================
- Hits        16080    15424     -656     
- Misses       6769     7463     +694     
Components Coverage Δ
Analytics 70.78% <ø> (ø)
Common 70.88% <ø> (ø)
Core 61.02% <54.90%> (-4.47%) ⬇️
SmartStore 73.45% <ø> (ø)
MobileSync 88.84% <ø> (ø)
Files with missing lines Coverage Δ
...DKCore/Classes/Extensions/UserAccountManager.swift 28.57% <ø> (ø)
...lesforceSDKCore/Classes/IDP/SFSDKUITableViewCell.m 0.00% <ø> (ø)
.../Classes/IDP/SFSDKUserSelectionNavViewController.m 0.00% <ø> (ø)
...KCore/SalesforceSDKCore/Classes/IDP/SPConfig.swift 0.00% <ø> (ø)
...Login/LoginHost/SFSDKLoginHostListViewController.m 70.14% <100.00%> (-5.48%) ⬇️
...sforceSDKCore/Classes/OAuth/SFSDKAuthPreferences.m 89.36% <100.00%> (+0.23%) ⬆️
...esforceSDKCore/Classes/Util/SFManagedPreferences.m 83.78% <ø> (ø)
...forceSDKCore/Classes/Login/SFLoginViewController.m 51.30% <50.00%> (-8.93%) ⬇️
...forceSDKCore/Classes/Common/SalesforceSDKManager.m 75.62% <60.00%> (-1.20%) ⬇️
...lesforceSDKCore/Classes/OAuth/SFOAuthCoordinator.m 56.26% <0.00%> (-9.19%) ⬇️
... and 3 more

... and 25 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
TestsPassedSkippedFailed ❌️
AuthFlowTester UI Test Results all1 ran1 ❌
TestResult
AuthFlowTester UI Test Results all
AuthFlowTesterUITests.xctest
LegacyLoginTests.testCAOpaque_DefaultScopes_WebServerFlow()❌ failure

@sfdctaka
sfdctaka marked this pull request as ready for review August 28, 2026 00:01
@sfdctaka
sfdctaka requested a review from brandonpage August 28, 2026 18:52
The -Wdeprecated-implementations suppression pushed before @implementation
had no matching pop, so it silenced the warning for the entire file rather
than just the implementation block. Add the pop before @EnD to scope it.
@sfdctaka
sfdctaka requested a review from wmathurin August 28, 2026 22:09
@sfdctaka
sfdctaka merged commit 1161289 into forcedotcom:dev Aug 29, 2026
21 of 24 checks passed
@sfdctaka
sfdctaka deleted the deprecate-idp-flow branch August 29, 2026 07:26
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