From 73a6f059a86a798ced0ad4cbdaadcdfccdc759c9 Mon Sep 17 00:00:00 2001 From: Alec Rippberger Date: Tue, 15 Apr 2025 16:15:20 -0500 Subject: [PATCH] Use TwoFactorAuthData import instead of separate interface --- .../two-factor-auth/two-factor-auth.component.ts | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/libs/auth/src/angular/two-factor-auth/two-factor-auth.component.ts b/libs/auth/src/angular/two-factor-auth/two-factor-auth.component.ts index be129f3f613..846070850cd 100644 --- a/libs/auth/src/angular/two-factor-auth/two-factor-auth.component.ts +++ b/libs/auth/src/angular/two-factor-auth/two-factor-auth.component.ts @@ -46,7 +46,7 @@ import { ToastService, } from "@bitwarden/components"; -import { TwoFactorAuthComponentCacheService } from "../../common/services/auth-request/two-factor-auth-cache.service"; +import { TwoFactorAuthComponentCacheService , TwoFactorAuthData } from "../../common/services/auth-request/two-factor-auth-cache.service"; import { AnonLayoutWrapperDataService } from "../anon-layout/anon-layout-wrapper-data.service"; import { TwoFactorAuthAuthenticatorIcon, @@ -71,15 +71,6 @@ import { TwoFactorOptionsDialogResult, } from "./two-factor-options.component"; -/** - * Interface for the cache data structure - */ -interface TwoFactorCacheData { - token?: string; - remember?: boolean; - selectedProviderType?: TwoFactorProviderType; -} - @Component({ standalone: true, selector: "app-two-factor-auth", @@ -222,7 +213,7 @@ export class TwoFactorAuthComponent implements OnInit, OnDestroy { /** * Save specific form data fields to the cache */ - async saveFormDataWithPartialData(data: Partial) { + async saveFormDataWithPartialData(data: Partial) { // Get current cached data const currentData = this.twoFactorCacheService.getCachedData(); @@ -240,7 +231,7 @@ export class TwoFactorAuthComponent implements OnInit, OnDestroy { * Save all current form data to the cache */ async saveFormData() { - const formData: TwoFactorCacheData = { + const formData: TwoFactorAuthData = { token: this.tokenFormControl.value || undefined, remember: this.rememberFormControl.value ?? undefined, selectedProviderType: this.selectedProviderType,