Skip to content

Commit 2d03a7f

Browse files
authored
Merge pull request #2761 from brandonpage/fix-singleServerCustomTabActivity-loading
Fix singleServerCustomTabActivity loading while waiting for PKCE.
2 parents c9f0586 + 59f68dc commit 2d03a7f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/LoginActivity.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@ open class LoginActivity : FragmentActivity() {
278278
// Check if the user backed out of the custom tab.
279279
if (result.resultCode == Activity.RESULT_CANCELED) {
280280
if (viewModel.singleServerCustomTabActivity) {
281-
finish()
281+
// Show blank page and spinner until PKCE is done.
282+
viewModel.loginUrl.value = ABOUT_BLANK
282283
} else {
283284
// Don't show server picker if we are re-authenticating with cookie.
284285
clearWebView(showServerPicker = !sharedBrowserSession)
@@ -1192,7 +1193,7 @@ open class LoginActivity : FragmentActivity() {
11921193
val useLightIcons = titleTextColorLight ?: topAppBarDark ?: dynamicThemeIsDark
11931194
WindowCompat.getInsetsController(window, window.decorView).isAppearanceLightStatusBars = useLightIcons
11941195
}.also {
1195-
if (!viewModel.authFinished.value) {
1196+
if (!viewModel.authFinished.value && url != ABOUT_BLANK) {
11961197
viewModel.loading.value = false
11971198
}
11981199
}

0 commit comments

Comments
 (0)