diff --git a/jslib b/jslib index e0cc754d6f..9caea70ea2 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit e0cc754d6fe962a5e7eae6d1dead8b44606d4853 +Subproject commit 9caea70ea2dbfdb591ef08a3d33def7f591f1276 diff --git a/src/app/accounts/two-factor-options.component.ts b/src/app/accounts/two-factor-options.component.ts index 599845e994..5306064381 100644 --- a/src/app/accounts/two-factor-options.component.ts +++ b/src/app/accounts/two-factor-options.component.ts @@ -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); } } diff --git a/src/app/accounts/two-factor.component.ts b/src/app/accounts/two-factor.component.ts index 8f86fd3c56..1ca79494f1 100644 --- a/src/app/accounts/two-factor.component.ts +++ b/src/app/accounts/two-factor.component.ts @@ -9,6 +9,7 @@ import { I18nService } from "jslib-common/abstractions/i18n.service"; 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 { TwoFactorService } from "jslib-common/abstractions/twoFactor.service"; import { ModalService } from "jslib-angular/services/modal.service"; @@ -36,7 +37,8 @@ export class TwoFactorComponent extends BaseTwoFactorComponent { environmentService: EnvironmentService, private modalService: ModalService, route: ActivatedRoute, - logService: LogService + logService: LogService, + twoFactorService: TwoFactorService ) { super( authService, @@ -48,7 +50,8 @@ export class TwoFactorComponent extends BaseTwoFactorComponent { environmentService, stateService, route, - logService + logService, + twoFactorService ); this.onSuccessfulLoginNavigate = this.goAfterLogIn; } diff --git a/src/app/services/services.module.ts b/src/app/services/services.module.ts index 7cd0b25b0d..d58148acbe 100644 --- a/src/app/services/services.module.ts +++ b/src/app/services/services.module.ts @@ -1,4 +1,4 @@ -import { APP_INITIALIZER, Injector, NgModule } from "@angular/core"; +import { APP_INITIALIZER, NgModule } from "@angular/core"; import { ToastrModule } from "ngx-toastr"; import { BroadcasterMessagingService } from "../../services/broadcasterMessaging.service"; @@ -20,7 +20,6 @@ import { RouterService } from "./router.service"; import { JslibServicesModule } from "jslib-angular/services/jslib-services.module"; import { ModalService as ModalServiceAbstraction } from "jslib-angular/services/modal.service"; -import { AuthService } from "jslib-common/services/auth.service"; import { ContainerService } from "jslib-common/services/container.service"; import { CryptoService } from "jslib-common/services/crypto.service"; import { EventService as EventLoggingService } from "jslib-common/services/event.service"; @@ -28,7 +27,6 @@ import { ImportService } from "jslib-common/services/import.service"; import { VaultTimeoutService } from "jslib-common/services/vaultTimeout.service"; import { ApiService as ApiServiceAbstraction } from "jslib-common/abstractions/api.service"; -import { AuthService as AuthServiceAbstraction } from "jslib-common/abstractions/auth.service"; import { CipherService as CipherServiceAbstraction } from "jslib-common/abstractions/cipher.service"; import { CollectionService as CollectionServiceAbstraction } from "jslib-common/abstractions/collection.service"; import { CryptoService as CryptoServiceAbstraction } from "jslib-common/abstractions/crypto.service"; @@ -49,6 +47,7 @@ import { PlatformUtilsService as PlatformUtilsServiceAbstraction } from "jslib-c import { StateService as BaseStateServiceAbstraction } from "jslib-common/abstractions/state.service"; import { StateMigrationService as StateMigrationServiceAbstraction } from "jslib-common/abstractions/stateMigration.service"; import { StorageService as StorageServiceAbstraction } from "jslib-common/abstractions/storage.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"; @@ -68,7 +67,7 @@ export function initFactory( vaultTimeoutService: VaultTimeoutService, i18nService: I18nService, eventLoggingService: EventLoggingService, - authService: AuthService, + twoFactorService: TwoFactorServiceAbstraction, stateService: StateServiceAbstraction, platformUtilsService: PlatformUtilsServiceAbstraction, cryptoService: CryptoServiceAbstraction @@ -86,7 +85,7 @@ export function initFactory( const locale = await stateService.getLocale(); await i18nService.init(locale); eventLoggingService.init(true); - authService.init(); + twoFactorService.init(); const htmlEl = window.document.documentElement; htmlEl.classList.add("locale_" + i18nService.translationLocale); @@ -118,7 +117,7 @@ export function initFactory( VaultTimeoutServiceAbstraction, I18nServiceAbstraction, EventLoggingServiceAbstraction, - AuthServiceAbstraction, + TwoFactorServiceAbstraction, StateServiceAbstraction, PlatformUtilsServiceAbstraction, CryptoServiceAbstraction, diff --git a/src/app/settings/two-factor-setup.component.ts b/src/app/settings/two-factor-setup.component.ts index ddceaf042d..6266165382 100644 --- a/src/app/settings/two-factor-setup.component.ts +++ b/src/app/settings/two-factor-setup.component.ts @@ -5,7 +5,7 @@ import { MessagingService } from "jslib-common/abstractions/messaging.service"; import { PolicyService } from "jslib-common/abstractions/policy.service"; import { StateService } from "jslib-common/abstractions/state.service"; -import { TwoFactorProviders } from "jslib-common/services/auth.service"; +import { TwoFactorProviders } from "jslib-common/services/twoFactor.service"; import { ModalService } from "jslib-angular/services/modal.service";