1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-18 18:33:50 +00:00

[PM-28648] Handle delayed availability of biometric unlock (#17603)

* Handle delayed availability of biometric unlock

* Fix linting

---------

Co-authored-by: Bernd Schoolmann <mail@quexten.com>
This commit is contained in:
Dubzer
2026-01-06 18:20:31 +03:00
committed by jaasen-livefront
parent 9dddd691dc
commit 27311f0ff6

View File

@@ -217,12 +217,20 @@ export class LockComponent implements OnInit, OnDestroy {
.pipe(
mergeMap(async () => {
if (this.activeAccount?.id != null) {
const prevBiometricsEnabled = this.unlockOptions?.biometrics.enabled;
this.unlockOptions = await firstValueFrom(
this.lockComponentService.getAvailableUnlockOptions$(this.activeAccount.id),
);
if (this.activeUnlockOption == null) {
this.loading = false;
await this.setDefaultActiveUnlockOption(this.unlockOptions);
} else if (!prevBiometricsEnabled && this.unlockOptions?.biometrics.enabled) {
await this.setDefaultActiveUnlockOption(this.unlockOptions);
if (this.activeUnlockOption === UnlockOption.Biometrics) {
await this.handleBiometricsUnlockEnabled();
}
}
}
}),