Skip to content

Commit

Permalink
[BWA-1] Remove biometrics integrity check so users don't get locked o…
Browse files Browse the repository at this point in the history
…ut (#88)
  • Loading branch information
KatherineInCode authored May 9, 2024
1 parent 1971233 commit 857ab52
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@ class VaultUnlockProcessor: StateProcessor<
private func loadData() async {
state.biometricUnlockStatus = await (try? services.biometricsRepository.getBiometricUnlockStatus())
?? .notAvailable
// If biometric unlock is available, enabled,
// and the user's biometric integrity state is valid;
// If biometric unlock is available and enabled
// attempt to unlock the vault with biometrics once.
if case .available(_, true, true) = state.biometricUnlockStatus,
if case .available(_, true, _) = state.biometricUnlockStatus,
shouldAttemptAutomaticBiometricUnlock {
shouldAttemptAutomaticBiometricUnlock = false
await unlockWithBiometrics()
Expand All @@ -83,9 +82,8 @@ class VaultUnlockProcessor: StateProcessor<
///
private func unlockWithBiometrics() async {
let status = try? await services.biometricsRepository.getBiometricUnlockStatus()
guard case let .available(_, enabled: enabled, hasValidIntegrity) = status,
enabled,
hasValidIntegrity else {
guard case let .available(_, enabled: enabled, _) = status,
enabled else {
await loadData()
return
}
Expand Down

0 comments on commit 857ab52

Please sign in to comment.