mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 10:43:35 +00:00
[PM-18038] Fix safari using outdated biometrics protocol (#13287)
* Fix safari using outdated biometrics protocol * Remove logging * Remove log * Move canEnableBiometricUnlock to biometric service * Fix build * Add tests * Fix type error * Attempt to fix build * Fix build * Fix test failure
This commit is contained in:
@@ -388,24 +388,12 @@ export class SettingsComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
});
|
||||
|
||||
this.supportsBiometric = this.shouldAllowBiometricSetup(
|
||||
await this.biometricsService.getBiometricsStatus(),
|
||||
);
|
||||
this.supportsBiometric = await this.biometricsService.canEnableBiometricUnlock();
|
||||
this.timerId = setInterval(async () => {
|
||||
this.supportsBiometric = this.shouldAllowBiometricSetup(
|
||||
await this.biometricsService.getBiometricsStatus(),
|
||||
);
|
||||
this.supportsBiometric = await this.biometricsService.canEnableBiometricUnlock();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
private shouldAllowBiometricSetup(biometricStatus: BiometricsStatus): boolean {
|
||||
return [
|
||||
BiometricsStatus.Available,
|
||||
BiometricsStatus.AutoSetupNeeded,
|
||||
BiometricsStatus.ManualSetupNeeded,
|
||||
].includes(biometricStatus);
|
||||
}
|
||||
|
||||
async saveVaultTimeout(newValue: VaultTimeout) {
|
||||
if (newValue === VaultTimeoutStringType.Never) {
|
||||
const confirmed = await this.dialogService.openSimpleDialog({
|
||||
|
||||
Reference in New Issue
Block a user