Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BWA-1] Remove biometrics integrity check so users don't get locked out #88

Merged
merged 2 commits into from
May 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading