BIT-945 Continue with registration if HIBP call fails (#158)

This commit is contained in:
Andrew Haisting
2023-10-24 16:23:16 -05:00
committed by Álison Fernandes
parent bb2b0e8cd1
commit 8295a47e3d
2 changed files with 24 additions and 10 deletions

View File

@@ -157,14 +157,11 @@ class AuthRepositoryImpl @Inject constructor(
if (shouldCheckDataBreaches) {
haveIBeenPwnedService
.hasPasswordBeenBreached(password = masterPassword)
.fold(
onFailure = { return RegisterResult.Error(null) },
onSuccess = { foundDataBreaches ->
if (foundDataBreaches) {
return RegisterResult.DataBreachFound
}
},
)
.onSuccess { foundDataBreaches ->
if (foundDataBreaches) {
return RegisterResult.DataBreachFound
}
}
}
val kdf = Kdf.Pbkdf2(DEFAULT_KDF_ITERATIONS.toUInt())
return authSdkSource