From d53bd3fe5b66c68a0b3e345c9f73df657a42cc88 Mon Sep 17 00:00:00 2001 From: gbubemismith Date: Mon, 4 Sep 2023 15:35:29 -0400 Subject: [PATCH] Removed auth status reference from browser-fido2-user-interface service --- apps/browser/src/background/main.background.ts | 5 +---- .../services/fido2/browser-fido2-user-interface.service.ts | 7 +------ 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/apps/browser/src/background/main.background.ts b/apps/browser/src/background/main.background.ts index 03b297aecea..ce87d30a3f9 100644 --- a/apps/browser/src/background/main.background.ts +++ b/apps/browser/src/background/main.background.ts @@ -564,10 +564,7 @@ export default class MainBackground { this.browserPopoutWindowService = new BrowserPopoutWindowService(); this.popupUtilsService = new PopupUtilsService(this.isPrivateMode); - this.fido2UserInterfaceService = new BrowserFido2UserInterfaceService( - this.popupUtilsService, - this.authService - ); + this.fido2UserInterfaceService = new BrowserFido2UserInterfaceService(this.popupUtilsService); this.fido2AuthenticatorService = new Fido2AuthenticatorService( this.cipherService, this.fido2UserInterfaceService, diff --git a/apps/browser/src/services/fido2/browser-fido2-user-interface.service.ts b/apps/browser/src/services/fido2/browser-fido2-user-interface.service.ts index bf41fa930a9..36726de4e5b 100644 --- a/apps/browser/src/services/fido2/browser-fido2-user-interface.service.ts +++ b/apps/browser/src/services/fido2/browser-fido2-user-interface.service.ts @@ -14,7 +14,6 @@ import { fromEventPattern, } from "rxjs"; -import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { Utils } from "@bitwarden/common/platform/misc/utils"; import { UserRequestedFallbackAbortReason } from "@bitwarden/common/vault/abstractions/fido2/fido2-client.service.abstraction"; import { @@ -102,7 +101,7 @@ export type BrowserFido2Message = { sessionId: string } & ( ); export class BrowserFido2UserInterfaceService implements Fido2UserInterfaceServiceAbstraction { - constructor(private popupUtilsService: PopupUtilsService, private authService: AuthService) {} + constructor(private popupUtilsService: PopupUtilsService) {} async newSession( fallbackSupported: boolean, @@ -110,7 +109,6 @@ export class BrowserFido2UserInterfaceService implements Fido2UserInterfaceServi ): Promise { return await BrowserFido2UserInterfaceSession.create( this.popupUtilsService, - this.authService, fallbackSupported, abortController ); @@ -120,13 +118,11 @@ export class BrowserFido2UserInterfaceService implements Fido2UserInterfaceServi export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSession { static async create( popupUtilsService: PopupUtilsService, - authService: AuthService, fallbackSupported: boolean, abortController?: AbortController ): Promise { return new BrowserFido2UserInterfaceSession( popupUtilsService, - authService, fallbackSupported, abortController ); @@ -148,7 +144,6 @@ export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSessi private constructor( private readonly popupUtilsService: PopupUtilsService, - private readonly authService: AuthService, private readonly fallbackSupported: boolean, readonly abortController = new AbortController(), readonly sessionId = Utils.newGuid()