Deprecate IDP (Identity Provider) login flow - #3014
Merged
Merged
Conversation
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. - @deprecated(...) on the public IDP entry points: SalesforceSDKManager (idpManager, spManager, isIDPLoginFlowEnabled, setIDPAppPackageName, setAllowedSPApps); auth.idp.interfaces.IDPManager / SPManager / IDPAuthCodeActivity; auth.idp.SPConfig; the concrete IDPAuthCodeActivity, IDPReceiver, SPReceiver; LoginActivity.onIDPLoginClick(); RuntimeConfig.ConfigKey.IDPAppPackageName. - Internal usages suppressed with scoped @Suppress("DEPRECATION") so the SDK still builds warning-clean. Mirrors the useWebServerAuthentication (OAuth user agent flow) deprecation landed the same release.
Generated by 🚫 Danger |
brandonpage
reviewed
Aug 28, 2026
sfdctaka
marked this pull request as ready for review
August 28, 2026 00:01
Address review feedback: mirror the useWebServerAuthentication backing-field pattern so the SDK's own use of idpManager/spManager doesn't need scattered @Suppress("DEPRECATION"). Add @volatile private _idpManager/_spManager backing fields; the public deprecated properties delegate to them, and the manager's internal null checks and setters read/write the backing fields directly. Drops the in-manager suppressions on isIDPLoginFlowEnabled, isIdentityProvider, and setIDPAppPackageName. The public properties and backing fields keep one suppression each because their type is the deprecated interface, and setAllowedSPApps keeps one for its deprecated SPConfig parameter. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
brandonpage
approved these changes
Aug 28, 2026
wmathurin
approved these changes
Aug 28, 2026
wmathurin
left a comment
Contributor
There was a problem hiding this comment.
The fully-qualified type names on the public idpManager/spManager property signatures are a bit noisy — e.g. com.salesforce.androidsdk.auth.idp.interfaces.IDPManager? in the declaration. The alternative would be to add the import and suppress at the file level with @file:Suppress("DEPRECATION"), which is the same pattern used in IDPManager.kt and SPManager.kt. Minor nit — not a blocker.
…uppress Replace the fully-qualified com.salesforce.androidsdk.auth.idp.interfaces type names on the idpManager/spManager signatures with imported short names, and move the per-declaration @Suppress("DEPRECATION") annotations to a single @file:Suppress, matching the pattern already used in IDPManager.kt and SPManager.kt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
@Deprecated(…)on the public IDP entry points:SalesforceSDKManager:idpManager,spManager,isIDPLoginFlowEnabled,setIDPAppPackageName(String?),setAllowedSPApps(List<SPConfig>)auth.idp.interfaces.IDPManager,SPManager,IDPAuthCodeActivity(incl. nestedStatus/StatusUpdateCallback)auth.idp.SPConfig(data class +forCurrentApp()); the concreteIDPAuthCodeActivity,IDPReceiver,SPReceiverui.LoginActivity.onIDPLoginClick()config.RuntimeConfig.ConfigKey.IDPAppPackageName(annotation + javadoc@deprecated)@Suppress("DEPRECATION")(function/class-level where the deprecated use is localized,@file:Suppresson the IDP-flow-specific files) so the SDK still builds warning-clean.Notes
useWebServerAuthentication(OAuth user agent flow) deprecation landed the same release.idpManager/spManagerkeepprivate set; no backing fields introduced.setIDPAppPackageName(...)call is intentionally left as-is — it demonstrates the still-shipping IDP feature, and the deprecation warning is the correct signal for a developer copying the sample.