mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
Added full synce service to the fido2 authenticator to ensure the full sync is completed before getting all decrypted ciphers
This commit is contained in:
@@ -535,6 +535,7 @@ export default class MainBackground {
|
||||
this.fido2AuthenticatorService = new Fido2AuthenticatorService(
|
||||
this.cipherService,
|
||||
this.fido2UserInterfaceService,
|
||||
this.syncService,
|
||||
this.logService
|
||||
);
|
||||
this.fido2ClientService = new Fido2ClientService(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { NgZone } from "@angular/core";
|
||||
import type { NgZone } from "@angular/core";
|
||||
import { Observable } from "rxjs";
|
||||
|
||||
import { DeviceType } from "@bitwarden/common/enums";
|
||||
@@ -213,7 +213,15 @@ export class BrowserApi {
|
||||
}
|
||||
}
|
||||
|
||||
//Ngzone run is added to fix the issue on Fido2Component, where the message listener is not running in the angular zone
|
||||
/**
|
||||
* Creates an observable that listens for messages. If an Angular zone is provided,
|
||||
* ensures that the message processing runs within that zone, triggering change detection.
|
||||
* This solution was devised to address an issue in the `Fido2Component`, where the
|
||||
* original message listener operated outside the Angular zone.
|
||||
*
|
||||
* @param {NgZone} [zone] - An optional Angular zone to ensure UI updates and change
|
||||
* detection are triggered. If omitted, operates outside the Angular zone.
|
||||
*/
|
||||
static messageListener$(zone?: NgZone) {
|
||||
return new Observable<unknown>((subscriber) => {
|
||||
const handler = (message: unknown) => {
|
||||
|
||||
Reference in New Issue
Block a user