diff --git a/app/src/main/java/com/x8bit/bitwarden/data/auth/datasource/network/model/TwoFactorAuthMethod.kt b/app/src/main/java/com/x8bit/bitwarden/data/auth/datasource/network/model/TwoFactorAuthMethod.kt index 006afeaaa..764ea98f5 100644 --- a/app/src/main/java/com/x8bit/bitwarden/data/auth/datasource/network/model/TwoFactorAuthMethod.kt +++ b/app/src/main/java/com/x8bit/bitwarden/data/auth/datasource/network/model/TwoFactorAuthMethod.kt @@ -32,7 +32,7 @@ enum class TwoFactorAuthMethod(val value: UInt) { DUO_ORGANIZATION(value = 6U), @SerialName("7") - FIDO_2_WEB_APP(value = 7U), + WEB_AUTH(value = 7U), @SerialName("-1") RECOVERY_CODE(value = 100U), diff --git a/app/src/main/java/com/x8bit/bitwarden/data/auth/datasource/network/util/TwoFactorAuthMethodExtensions.kt b/app/src/main/java/com/x8bit/bitwarden/data/auth/datasource/network/util/TwoFactorAuthMethodExtensions.kt index 9c5d86753..f7460773d 100644 --- a/app/src/main/java/com/x8bit/bitwarden/data/auth/datasource/network/util/TwoFactorAuthMethodExtensions.kt +++ b/app/src/main/java/com/x8bit/bitwarden/data/auth/datasource/network/util/TwoFactorAuthMethodExtensions.kt @@ -14,6 +14,6 @@ val TwoFactorAuthMethod.priority: Int TwoFactorAuthMethod.DUO -> 2 TwoFactorAuthMethod.YUBI_KEY -> 3 TwoFactorAuthMethod.DUO_ORGANIZATION -> 20 - TwoFactorAuthMethod.FIDO_2_WEB_APP -> 4 + TwoFactorAuthMethod.WEB_AUTH -> 4 else -> -1 } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/twofactorlogin/TwoFactorLoginViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/twofactorlogin/TwoFactorLoginViewModel.kt index 032330bb3..0f4f196d7 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/twofactorlogin/TwoFactorLoginViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/twofactorlogin/TwoFactorLoginViewModel.kt @@ -380,7 +380,7 @@ class TwoFactorLoginViewModel @Inject constructor( TwoFactorAuthMethod.U2F, TwoFactorAuthMethod.REMEMBER, TwoFactorAuthMethod.DUO_ORGANIZATION, - TwoFactorAuthMethod.FIDO_2_WEB_APP, + TwoFactorAuthMethod.WEB_AUTH, -> { mutableStateFlow.update { it.copy(authMethod = action.authMethod) } } @@ -410,7 +410,7 @@ class TwoFactorLoginViewModel @Inject constructor( TwoFactorAuthMethod.YUBI_KEY, TwoFactorAuthMethod.U2F, TwoFactorAuthMethod.REMEMBER, - TwoFactorAuthMethod.FIDO_2_WEB_APP, + TwoFactorAuthMethod.WEB_AUTH, TwoFactorAuthMethod.RECOVERY_CODE, -> state.codeInput } diff --git a/app/src/test/java/com/x8bit/bitwarden/data/auth/datasource/network/util/TwoFactorAuthMethodExtensionTest.kt b/app/src/test/java/com/x8bit/bitwarden/data/auth/datasource/network/util/TwoFactorAuthMethodExtensionTest.kt index 4f7d1bc0d..2315124e4 100644 --- a/app/src/test/java/com/x8bit/bitwarden/data/auth/datasource/network/util/TwoFactorAuthMethodExtensionTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/data/auth/datasource/network/util/TwoFactorAuthMethodExtensionTest.kt @@ -14,7 +14,7 @@ class TwoFactorAuthMethodExtensionTest { TwoFactorAuthMethod.U2F to -1, TwoFactorAuthMethod.REMEMBER to -1, TwoFactorAuthMethod.DUO_ORGANIZATION to 20, - TwoFactorAuthMethod.FIDO_2_WEB_APP to 4, + TwoFactorAuthMethod.WEB_AUTH to 4, TwoFactorAuthMethod.RECOVERY_CODE to -1, ) .forEach { (type, priority) -> diff --git a/app/src/test/java/com/x8bit/bitwarden/ui/auth/feature/twofactorlogin/util/TwoFactorAuthMethodExtensionTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/auth/feature/twofactorlogin/util/TwoFactorAuthMethodExtensionTest.kt index a67bd7f26..6f9be368f 100644 --- a/app/src/test/java/com/x8bit/bitwarden/ui/auth/feature/twofactorlogin/util/TwoFactorAuthMethodExtensionTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/auth/feature/twofactorlogin/util/TwoFactorAuthMethodExtensionTest.kt @@ -20,7 +20,7 @@ class TwoFactorAuthMethodExtensionTest { TwoFactorAuthMethod.DUO_ORGANIZATION to R.string.duo_org_title.asText( R.string.organization.asText(), ), - TwoFactorAuthMethod.FIDO_2_WEB_APP to "".asText(), + TwoFactorAuthMethod.WEB_AUTH to "".asText(), TwoFactorAuthMethod.RECOVERY_CODE to R.string.recovery_code_title.asText(), ) .forEach { (type, title) -> @@ -48,7 +48,7 @@ class TwoFactorAuthMethodExtensionTest { .asText() .concat(" ".asText()) .concat(R.string.follow_the_steps_from_duo_to_finish_logging_in.asText()), - TwoFactorAuthMethod.FIDO_2_WEB_APP to "".asText(), + TwoFactorAuthMethod.WEB_AUTH to "".asText(), TwoFactorAuthMethod.RECOVERY_CODE to "".asText(), ) .forEach { (type, title) -> @@ -69,7 +69,7 @@ class TwoFactorAuthMethodExtensionTest { TwoFactorAuthMethod.U2F to false, TwoFactorAuthMethod.REMEMBER to false, TwoFactorAuthMethod.DUO_ORGANIZATION to true, - TwoFactorAuthMethod.FIDO_2_WEB_APP to false, + TwoFactorAuthMethod.WEB_AUTH to false, TwoFactorAuthMethod.RECOVERY_CODE to false, ) .forEach { (type, isDuo) -> @@ -87,7 +87,7 @@ class TwoFactorAuthMethodExtensionTest { TwoFactorAuthMethod.U2F to false, TwoFactorAuthMethod.REMEMBER to false, TwoFactorAuthMethod.DUO_ORGANIZATION to false, - TwoFactorAuthMethod.FIDO_2_WEB_APP to false, + TwoFactorAuthMethod.WEB_AUTH to false, TwoFactorAuthMethod.RECOVERY_CODE to false, ) .forEach { (type, shouldUseNfc) -> @@ -105,7 +105,7 @@ class TwoFactorAuthMethodExtensionTest { TwoFactorAuthMethod.U2F to null, TwoFactorAuthMethod.REMEMBER to null, TwoFactorAuthMethod.DUO_ORGANIZATION to null, - TwoFactorAuthMethod.FIDO_2_WEB_APP to null, + TwoFactorAuthMethod.WEB_AUTH to null, TwoFactorAuthMethod.RECOVERY_CODE to null, ) .forEach { (type, imageRes) ->