mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-27 12:26:38 +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 { Component } from "@angular/core";
|
||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
|
|
||||||
import { AuthService } from "jslib-common/abstractions/auth.service";
|
|
||||||
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
||||||
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.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";
|
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 {
|
export class TwoFactorOptionsComponent extends BaseTwoFactorOptionsComponent {
|
||||||
constructor(
|
constructor(
|
||||||
authService: AuthService,
|
twoFactorService: TwoFactorService,
|
||||||
router: Router,
|
router: Router,
|
||||||
i18nService: I18nService,
|
i18nService: I18nService,
|
||||||
platformUtilsService: PlatformUtilsService
|
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 { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
|
||||||
import { StateService } from "jslib-common/abstractions/state.service";
|
import { StateService } from "jslib-common/abstractions/state.service";
|
||||||
import { SyncService } from "jslib-common/abstractions/sync.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";
|
import { ModalService } from "jslib-angular/services/modal.service";
|
||||||
|
|
||||||
@ -40,7 +41,8 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
|||||||
private modalService: ModalService,
|
private modalService: ModalService,
|
||||||
stateService: StateService,
|
stateService: StateService,
|
||||||
route: ActivatedRoute,
|
route: ActivatedRoute,
|
||||||
logService: LogService
|
logService: LogService,
|
||||||
|
twoFactorService: TwoFactorService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
authService,
|
authService,
|
||||||
@ -52,7 +54,8 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
|||||||
environmentService,
|
environmentService,
|
||||||
stateService,
|
stateService,
|
||||||
route,
|
route,
|
||||||
logService
|
logService,
|
||||||
|
twoFactorService
|
||||||
);
|
);
|
||||||
super.onSuccessfulLogin = () => {
|
super.onSuccessfulLogin = () => {
|
||||||
return syncService.fullSync(true);
|
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 { 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 { ContainerService } from "jslib-common/services/container.service";
|
||||||
import { EventService } from "jslib-common/services/event.service";
|
import { EventService } from "jslib-common/services/event.service";
|
||||||
import { SystemService } from "jslib-common/services/system.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 { 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 { BroadcasterService as BroadcasterServiceAbstraction } from "jslib-common/abstractions/broadcaster.service";
|
||||||
import { CryptoService as CryptoServiceAbstraction } from "jslib-common/abstractions/crypto.service";
|
import { CryptoService as CryptoServiceAbstraction } from "jslib-common/abstractions/crypto.service";
|
||||||
import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from "jslib-common/abstractions/cryptoFunction.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 { StorageService as StorageServiceAbstraction } from "jslib-common/abstractions/storage.service";
|
||||||
import { SyncService as SyncServiceAbstraction } from "jslib-common/abstractions/sync.service";
|
import { SyncService as SyncServiceAbstraction } from "jslib-common/abstractions/sync.service";
|
||||||
import { SystemService as SystemServiceAbstraction } from "jslib-common/abstractions/system.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 { VaultTimeoutService as VaultTimeoutServiceAbstraction } from "jslib-common/abstractions/vaultTimeout.service";
|
||||||
|
|
||||||
import { ThemeType } from "jslib-common/enums/themeType";
|
import { ThemeType } from "jslib-common/enums/themeType";
|
||||||
@ -58,7 +57,7 @@ export function initFactory(
|
|||||||
vaultTimeoutService: VaultTimeoutService,
|
vaultTimeoutService: VaultTimeoutService,
|
||||||
i18nService: I18nService,
|
i18nService: I18nService,
|
||||||
eventService: EventService,
|
eventService: EventService,
|
||||||
authService: AuthService,
|
twoFactorService: TwoFactorServiceAbstraction,
|
||||||
notificationsService: NotificationsServiceAbstraction,
|
notificationsService: NotificationsServiceAbstraction,
|
||||||
platformUtilsService: PlatformUtilsServiceAbstraction,
|
platformUtilsService: PlatformUtilsServiceAbstraction,
|
||||||
stateService: StateServiceAbstraction,
|
stateService: StateServiceAbstraction,
|
||||||
@ -74,7 +73,7 @@ export function initFactory(
|
|||||||
const locale = await stateService.getLocale();
|
const locale = await stateService.getLocale();
|
||||||
await i18nService.init(locale);
|
await i18nService.init(locale);
|
||||||
eventService.init(true);
|
eventService.init(true);
|
||||||
authService.init();
|
twoFactorService.init();
|
||||||
setTimeout(() => notificationsService.init(), 3000);
|
setTimeout(() => notificationsService.init(), 3000);
|
||||||
const htmlEl = window.document.documentElement;
|
const htmlEl = window.document.documentElement;
|
||||||
htmlEl.classList.add("os_" + platformUtilsService.getDeviceString());
|
htmlEl.classList.add("os_" + platformUtilsService.getDeviceString());
|
||||||
@ -121,7 +120,7 @@ export function initFactory(
|
|||||||
VaultTimeoutServiceAbstraction,
|
VaultTimeoutServiceAbstraction,
|
||||||
I18nServiceAbstraction,
|
I18nServiceAbstraction,
|
||||||
EventServiceAbstraction,
|
EventServiceAbstraction,
|
||||||
AuthServiceAbstraction,
|
TwoFactorServiceAbstraction,
|
||||||
NotificationsServiceAbstraction,
|
NotificationsServiceAbstraction,
|
||||||
PlatformUtilsServiceAbstraction,
|
PlatformUtilsServiceAbstraction,
|
||||||
StateServiceAbstraction,
|
StateServiceAbstraction,
|
||||||
|
Loading…
Reference in New Issue
Block a user