From b64bb426ca8e6664dd2920fbce668fe989d8dcd3 Mon Sep 17 00:00:00 2001 From: Shahzaib Date: Sun, 28 Sep 2025 13:27:24 -0700 Subject: [PATCH 1/3] Fix for app link redirect from CCT due to forced browser preference --- .../common/internal/providers/oauth2/SwitchBrowserActivity.kt | 1 - .../identity/common/internal/ui/browser/CustomTabsManager.java | 1 - 2 files changed, 2 deletions(-) diff --git a/common/src/main/java/com/microsoft/identity/common/internal/providers/oauth2/SwitchBrowserActivity.kt b/common/src/main/java/com/microsoft/identity/common/internal/providers/oauth2/SwitchBrowserActivity.kt index d1bd9ed564..805403484e 100644 --- a/common/src/main/java/com/microsoft/identity/common/internal/providers/oauth2/SwitchBrowserActivity.kt +++ b/common/src/main/java/com/microsoft/identity/common/internal/providers/oauth2/SwitchBrowserActivity.kt @@ -147,7 +147,6 @@ class SwitchBrowserActivity : FragmentActivity() { Logger.warn(methodTag, "CustomTabsService is NOT supported") browserIntent = Intent(Intent.ACTION_VIEW) } - browserIntent.setPackage(browserPackageName) browserIntent.setData(processUri.toUri()) startActivity(browserIntent) } diff --git a/common/src/main/java/com/microsoft/identity/common/internal/ui/browser/CustomTabsManager.java b/common/src/main/java/com/microsoft/identity/common/internal/ui/browser/CustomTabsManager.java index 9f50b6a6ab..e252dfea7b 100644 --- a/common/src/main/java/com/microsoft/identity/common/internal/ui/browser/CustomTabsManager.java +++ b/common/src/main/java/com/microsoft/identity/common/internal/ui/browser/CustomTabsManager.java @@ -134,7 +134,6 @@ public synchronized boolean bind(final @Nullable Context context, @NonNull Strin final CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(createSession(null)); builder.setSendToExternalDefaultHandlerEnabled(true); mCustomTabsIntent = builder.setShowTitle(true).build(); - mCustomTabsIntent.intent.setPackage(browserPackage); return true; } From 0ef816a499ab42f92cdf5573ca4afcb0633f6496 Mon Sep 17 00:00:00 2001 From: Shahzaib Date: Sun, 28 Sep 2025 19:10:22 -0700 Subject: [PATCH 2/3] Update changelog.txt --- changelog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.txt b/changelog.txt index 6539194376..9f711cf04c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -10,6 +10,7 @@ vNext - [MINOR] Awaiting MFA Delegate now automatically returns the AuthMethods to be used when calling MFA Challenge (#2764) - [MINOR] SDK now handles SMS as strong authentication method #2766 - [MINOR] Added error handling when webcp redirects have browser protocol #2767 +- [PATCH] Fix for app link redirect from CCT due to forced browser preference (#2775) Version 22.1.0 ---------- From 6c53b9a1404582fcd8a722e0c95fbd41df1498b4 Mon Sep 17 00:00:00 2001 From: Shahzaib Date: Mon, 29 Sep 2025 10:10:34 -0700 Subject: [PATCH 3/3] Address comment --- .../common/internal/providers/oauth2/SwitchBrowserActivity.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/common/src/main/java/com/microsoft/identity/common/internal/providers/oauth2/SwitchBrowserActivity.kt b/common/src/main/java/com/microsoft/identity/common/internal/providers/oauth2/SwitchBrowserActivity.kt index 805403484e..b5b8db6adb 100644 --- a/common/src/main/java/com/microsoft/identity/common/internal/providers/oauth2/SwitchBrowserActivity.kt +++ b/common/src/main/java/com/microsoft/identity/common/internal/providers/oauth2/SwitchBrowserActivity.kt @@ -146,6 +146,7 @@ class SwitchBrowserActivity : FragmentActivity() { } else { Logger.warn(methodTag, "CustomTabsService is NOT supported") browserIntent = Intent(Intent.ACTION_VIEW) + browserIntent.setPackage(browserPackageName) } browserIntent.setData(processUri.toUri()) startActivity(browserIntent)