mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-30 13:03:53 +01:00
Update client for authService refactor (#1239)
This commit is contained in:
parent
4e75a25492
commit
762e3f8198
2
jslib
2
jslib
@ -1 +1 @@
|
||||
Subproject commit e0cc754d6fe962a5e7eae6d1dead8b44606d4853
|
||||
Subproject commit 6b8508579f89b4c54afa6aab2b7155aac70fb8a9
|
@ -1,9 +1,9 @@
|
||||
import { Component } from "@angular/core";
|
||||
import { Router } from "@angular/router";
|
||||
|
||||
import { AuthService } from "jslib-common/abstractions/auth.service";
|
||||
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
||||
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
|
||||
import { TwoFactorService } from "jslib-common/abstractions/twoFactor.service";
|
||||
|
||||
import { TwoFactorOptionsComponent as BaseTwoFactorOptionsComponent } from "jslib-angular/components/two-factor-options.component";
|
||||
|
||||
@ -13,11 +13,11 @@ import { TwoFactorOptionsComponent as BaseTwoFactorOptionsComponent } from "jsli
|
||||
})
|
||||
export class TwoFactorOptionsComponent extends BaseTwoFactorOptionsComponent {
|
||||
constructor(
|
||||
authService: AuthService,
|
||||
twoFactorService: TwoFactorService,
|
||||
router: Router,
|
||||
i18nService: I18nService,
|
||||
platformUtilsService: PlatformUtilsService
|
||||
) {
|
||||
super(authService, router, i18nService, platformUtilsService, window);
|
||||
super(twoFactorService, router, i18nService, platformUtilsService, window);
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ import { LogService } from "jslib-common/abstractions/log.service";
|
||||
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
|
||||
import { StateService } from "jslib-common/abstractions/state.service";
|
||||
import { SyncService } from "jslib-common/abstractions/sync.service";
|
||||
import { TwoFactorService } from "jslib-common/abstractions/twoFactor.service";
|
||||
|
||||
import { ModalService } from "jslib-angular/services/modal.service";
|
||||
|
||||
@ -40,7 +41,8 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
||||
private modalService: ModalService,
|
||||
stateService: StateService,
|
||||
route: ActivatedRoute,
|
||||
logService: LogService
|
||||
logService: LogService,
|
||||
twoFactorService: TwoFactorService
|
||||
) {
|
||||
super(
|
||||
authService,
|
||||
@ -52,7 +54,8 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
||||
environmentService,
|
||||
stateService,
|
||||
route,
|
||||
logService
|
||||
logService,
|
||||
twoFactorService
|
||||
);
|
||||
super.onSuccessfulLogin = () => {
|
||||
return syncService.fullSync(true);
|
||||
|
@ -16,7 +16,6 @@ import { SearchBarService } from "./layout/search/search-bar.service";
|
||||
|
||||
import { JslibServicesModule } from "jslib-angular/services/jslib-services.module";
|
||||
|
||||
import { AuthService } from "jslib-common/services/auth.service";
|
||||
import { ContainerService } from "jslib-common/services/container.service";
|
||||
import { EventService } from "jslib-common/services/event.service";
|
||||
import { SystemService } from "jslib-common/services/system.service";
|
||||
@ -24,7 +23,6 @@ import { VaultTimeoutService } from "jslib-common/services/vaultTimeout.service"
|
||||
|
||||
import { ElectronCryptoService } from "jslib-electron/services/electronCrypto.service";
|
||||
|
||||
import { AuthService as AuthServiceAbstraction } from "jslib-common/abstractions/auth.service";
|
||||
import { BroadcasterService as BroadcasterServiceAbstraction } from "jslib-common/abstractions/broadcaster.service";
|
||||
import { CryptoService as CryptoServiceAbstraction } from "jslib-common/abstractions/crypto.service";
|
||||
import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from "jslib-common/abstractions/cryptoFunction.service";
|
||||
@ -41,6 +39,7 @@ import { StateMigrationService as StateMigrationServiceAbstraction } from "jslib
|
||||
import { StorageService as StorageServiceAbstraction } from "jslib-common/abstractions/storage.service";
|
||||
import { SyncService as SyncServiceAbstraction } from "jslib-common/abstractions/sync.service";
|
||||
import { SystemService as SystemServiceAbstraction } from "jslib-common/abstractions/system.service";
|
||||
import { TwoFactorService as TwoFactorServiceAbstraction } from "jslib-common/abstractions/twoFactor.service";
|
||||
import { VaultTimeoutService as VaultTimeoutServiceAbstraction } from "jslib-common/abstractions/vaultTimeout.service";
|
||||
|
||||
import { ThemeType } from "jslib-common/enums/themeType";
|
||||
@ -58,7 +57,7 @@ export function initFactory(
|
||||
vaultTimeoutService: VaultTimeoutService,
|
||||
i18nService: I18nService,
|
||||
eventService: EventService,
|
||||
authService: AuthService,
|
||||
twoFactorService: TwoFactorServiceAbstraction,
|
||||
notificationsService: NotificationsServiceAbstraction,
|
||||
platformUtilsService: PlatformUtilsServiceAbstraction,
|
||||
stateService: StateServiceAbstraction,
|
||||
@ -74,7 +73,7 @@ export function initFactory(
|
||||
const locale = await stateService.getLocale();
|
||||
await i18nService.init(locale);
|
||||
eventService.init(true);
|
||||
authService.init();
|
||||
twoFactorService.init();
|
||||
setTimeout(() => notificationsService.init(), 3000);
|
||||
const htmlEl = window.document.documentElement;
|
||||
htmlEl.classList.add("os_" + platformUtilsService.getDeviceString());
|
||||
@ -121,7 +120,7 @@ export function initFactory(
|
||||
VaultTimeoutServiceAbstraction,
|
||||
I18nServiceAbstraction,
|
||||
EventServiceAbstraction,
|
||||
AuthServiceAbstraction,
|
||||
TwoFactorServiceAbstraction,
|
||||
NotificationsServiceAbstraction,
|
||||
PlatformUtilsServiceAbstraction,
|
||||
StateServiceAbstraction,
|
||||
|
Loading…
Reference in New Issue
Block a user