1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 02:03:39 +00:00

[PS-1134] Folder fixes, including revamped auth logic (#3118)

This commit is contained in:
Oscar Hinton
2022-07-18 14:39:12 +02:00
committed by GitHub
parent cd5aef1757
commit fbff2e5f00
11 changed files with 65 additions and 49 deletions

View File

@@ -44,7 +44,6 @@ import { ApiService } from "@bitwarden/common/services/api.service";
import { AppIdService } from "@bitwarden/common/services/appId.service";
import { AuditService } from "@bitwarden/common/services/audit.service";
import { AuthService } from "@bitwarden/common/services/auth.service";
import { BroadcasterService } from "@bitwarden/common/services/broadcaster.service";
import { CipherService } from "@bitwarden/common/services/cipher.service";
import { CollectionService } from "@bitwarden/common/services/collection.service";
import { ConsoleLogService } from "@bitwarden/common/services/consoleLog.service";
@@ -150,7 +149,6 @@ export default class MainBackground {
vaultFilterService: VaultFilterService;
usernameGenerationService: UsernameGenerationServiceAbstraction;
encryptService: EncryptService;
broadcasterService: BroadcasterService;
folderApiService: FolderApiServiceAbstraction;
// Passed to the popup for Safari to workaround issues with theming, downloading, etc.
@@ -272,13 +270,11 @@ export default class MainBackground {
this.logService,
this.stateService
);
this.broadcasterService = new BroadcasterService();
this.folderService = new FolderService(
this.cryptoService,
this.i18nService,
this.cipherService,
this.stateService,
this.broadcasterService
this.stateService
);
this.folderApiService = new FolderApiService(this.folderService, this.apiService);
this.collectionService = new CollectionService(

View File

@@ -13,7 +13,6 @@ import { ApiService } from "@bitwarden/common/abstractions/api.service";
import { AppIdService } from "@bitwarden/common/abstractions/appId.service";
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
import { AuthService as AuthServiceAbstraction } from "@bitwarden/common/abstractions/auth.service";
import { BroadcasterService as BroadcasterServiceAbstraction } from "@bitwarden/common/abstractions/broadcaster.service";
import { CipherService } from "@bitwarden/common/abstractions/cipher.service";
import { CollectionService } from "@bitwarden/common/abstractions/collection.service";
import { CryptoService } from "@bitwarden/common/abstractions/crypto.service";
@@ -114,10 +113,6 @@ function getBgService<T>(service: keyof MainBackground) {
: new BrowserMessagingService();
},
},
{
provide: BroadcasterServiceAbstraction,
useFactory: getBgService<BroadcasterServiceAbstraction>("broadcasterService"),
},
{
provide: TwoFactorService,
useFactory: getBgService<TwoFactorService>("twoFactorService"),