From 774b828cb0666e5a15d6fc13b2844219185ee146 Mon Sep 17 00:00:00 2001 From: Dave Severns <149429124+dseverns-livefront@users.noreply.github.com> Date: Tue, 24 Sep 2024 12:11:44 -0400 Subject: [PATCH] PM-11535 Only add password to 2 factor login path if present (#3958) --- .../feature/twofactorlogin/TwoFactorLoginNavigation.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/twofactorlogin/TwoFactorLoginNavigation.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/twofactorlogin/TwoFactorLoginNavigation.kt index 4dcfff7db..d7ba41744 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/twofactorlogin/TwoFactorLoginNavigation.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/twofactorlogin/TwoFactorLoginNavigation.kt @@ -4,6 +4,8 @@ import androidx.lifecycle.SavedStateHandle import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder import androidx.navigation.NavOptions +import androidx.navigation.NavType +import androidx.navigation.navArgument import com.x8bit.bitwarden.data.platform.annotation.OmitFromCoverage import com.x8bit.bitwarden.data.platform.datasource.network.util.base64UrlDecodeOrNull import com.x8bit.bitwarden.data.platform.datasource.network.util.base64UrlEncode @@ -48,6 +50,13 @@ fun NavGraphBuilder.twoFactorLoginDestination( ) { composableWithSlideTransitions( route = TWO_FACTOR_LOGIN_ROUTE, + arguments = listOf( + navArgument(EMAIL_ADDRESS) { type = NavType.StringType }, + navArgument(PASSWORD) { + type = NavType.StringType + nullable = true + }, + ), ) { TwoFactorLoginScreen( onNavigateBack = onNavigateBack,