1
0
mirror of https://github.com/bitwarden/web synced 2025-12-11 05:43:16 +00:00

Update jslib and use new UserVerificationService pattern (#1302)

* Use try/catch pattern for userVerification

* Update deps
This commit is contained in:
Thomas Rittson
2021-11-17 09:37:36 +10:00
committed by GitHub
parent 8889722388
commit f740d8b057
8 changed files with 58 additions and 48 deletions

View File

@@ -129,7 +129,7 @@ const policyService = new PolicyService(userService, storageService, apiService)
const sendService = new SendService(cryptoService, userService, apiService, fileUploadService, storageService,
i18nService, cryptoFunctionService);
const keyConnectorService = new KeyConnectorService(storageService, userService, cryptoService, apiService,
environmentService, tokenService, consoleLogService);
tokenService, consoleLogService);
const vaultTimeoutService = new VaultTimeoutService(cipherService, folderService, collectionService,
cryptoService, platformUtilsService, storageService, messagingService, searchService, userService, tokenService,
policyService, keyConnectorService, null, async () => messagingService.send('logout', { expired: false }));
@@ -150,6 +150,7 @@ const notificationsService = new NotificationsService(userService, syncService,
environmentService, async () => messagingService.send('logout', { expired: true }), consoleLogService);
const auditService = new AuditService(cryptoFunctionService, apiService);
const eventLoggingService = new EventLoggingService(storageService, apiService, userService, cipherService, consoleLogService);
const userVerificationService = new UserVerificationService(cryptoService, i18nService, apiService);
containerService.attachToWindow(window);
@@ -234,8 +235,8 @@ export function initFactory(): Function {
{ provide: PolicyServiceAbstraction, useValue: policyService },
{ provide: SendServiceAbstraction, useValue: sendService },
{ provide: KeyConnectorServiceAbstraction, useValue: keyConnectorService },
{ provide: UserVerificationServiceAbstraction, useValue: userVerificationService },
{ provide: PasswordRepromptServiceAbstraction, useClass: PasswordRepromptService },
{ provide: UserVerificationServiceAbstraction, useClass: UserVerificationService },
{ provide: LogService, useValue: consoleLogService },
{
provide: APP_INITIALIZER,