PM-11535 Only add password to 2 factor login path if present (#3958)

This commit is contained in:
Dave Severns 2024-09-24 12:11:44 -04:00 committed by GitHub
parent 071a5330e6
commit 774b828cb0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,