mirror of
https://github.com/bitwarden/browser
synced 2026-02-11 05:53:42 +00:00
Fix timeout when desktop app is not started
This commit is contained in:
@@ -54,7 +54,14 @@ export class ExtensionLockComponentService implements LockComponentService {
|
||||
if (!(await firstValueFrom(this.biometricStateService.biometricUnlockEnabled$))) {
|
||||
return BiometricsStatus.NotEnabledLocally;
|
||||
} else {
|
||||
return await this.biometricsService.getBiometricsStatusForUser(userId);
|
||||
// remove after backward compatibility code for old biometrics ipc protocol is removed
|
||||
const result: BiometricsStatus = (await Promise.race([
|
||||
this.biometricsService.getBiometricsStatusForUser(userId),
|
||||
new Promise((resolve) =>
|
||||
setTimeout(() => resolve(BiometricsStatus.DesktopDisconnected), 1000),
|
||||
),
|
||||
])) as BiometricsStatus;
|
||||
return result;
|
||||
}
|
||||
}),
|
||||
this.userDecryptionOptionsService.userDecryptionOptionsById$(userId),
|
||||
|
||||
Reference in New Issue
Block a user