diff --git a/web/packages/teleport/src/components/AuthnDialog/AuthnDialog.test.tsx b/web/packages/teleport/src/components/AuthnDialog/AuthnDialog.test.tsx index 16029e2790743..370e6f4d9d68d 100644 --- a/web/packages/teleport/src/components/AuthnDialog/AuthnDialog.test.tsx +++ b/web/packages/teleport/src/components/AuthnDialog/AuthnDialog.test.tsx @@ -17,7 +17,7 @@ */ import React from 'react'; -import { render, screen, fireEvent, waitFor } from 'design/utils/testing'; +import { render, screen, fireEvent } from 'design/utils/testing'; import { makeDefaultMfaState, MfaState } from 'teleport/lib/useMfa'; diff --git a/web/packages/teleport/src/components/ReAuthenticate/ReAuthenticate.story.tsx b/web/packages/teleport/src/components/ReAuthenticate/ReAuthenticate.story.tsx index a202663b5daa7..2db240156fcea 100644 --- a/web/packages/teleport/src/components/ReAuthenticate/ReAuthenticate.story.tsx +++ b/web/packages/teleport/src/components/ReAuthenticate/ReAuthenticate.story.tsx @@ -46,6 +46,8 @@ export const Failed = () => ( const props: State = { attempt: { status: '' }, clearAttempt: () => null, + mfaChallenge: null, + setMfaChallenge: () => null, getMfaChallenge: () => null, getMfaChallengeOptions: async () => [ MFA_OPTION_WEBAUTHN, diff --git a/web/packages/teleport/src/config.ts b/web/packages/teleport/src/config.ts index 3cae0814f39f6..176cfca3e6a63 100644 --- a/web/packages/teleport/src/config.ts +++ b/web/packages/teleport/src/config.ts @@ -34,10 +34,7 @@ import type { import type { SortType } from 'teleport/services/agents'; import type { RecordingType } from 'teleport/services/recordings'; -import type { - MfaChallengeResponse, - WebauthnAssertionResponse, -} from './services/mfa'; +import type { MfaChallengeResponse } from './services/mfa'; import type { PluginKind, Regions, diff --git a/web/packages/teleport/src/lib/EventEmitterMfaSender.ts b/web/packages/teleport/src/lib/EventEmitterMfaSender.ts index 656ac29dc77fe..2753251121061 100644 --- a/web/packages/teleport/src/lib/EventEmitterMfaSender.ts +++ b/web/packages/teleport/src/lib/EventEmitterMfaSender.ts @@ -18,10 +18,7 @@ import { EventEmitter } from 'events'; -import { - MfaChallengeResponse, - WebauthnAssertionResponse, -} from 'teleport/services/mfa'; +import { MfaChallengeResponse } from 'teleport/services/mfa'; class EventEmitterMfaSender extends EventEmitter { constructor() { diff --git a/web/packages/teleport/src/lib/tdp/client.ts b/web/packages/teleport/src/lib/tdp/client.ts index ef44f0cce0f3a..b6ab1264b185d 100644 --- a/web/packages/teleport/src/lib/tdp/client.ts +++ b/web/packages/teleport/src/lib/tdp/client.ts @@ -57,7 +57,6 @@ import type { SyncKeys, SharedDirectoryTruncateResponse, } from './codec'; -import type { WebauthnAssertionResponse } from 'teleport/services/mfa'; export enum TdpClientEvent { TDP_CLIENT_SCREEN_SPEC = 'tdp client screen spec', diff --git a/web/packages/teleport/src/lib/term/tty.ts b/web/packages/teleport/src/lib/term/tty.ts index bb6558e187f2a..a7076dd04e5b1 100644 --- a/web/packages/teleport/src/lib/term/tty.ts +++ b/web/packages/teleport/src/lib/term/tty.ts @@ -19,7 +19,6 @@ import Logger from 'shared/libs/logger'; import { EventEmitterMfaSender } from 'teleport/lib/EventEmitterMfaSender'; -import { WebauthnAssertionResponse } from 'teleport/services/mfa'; import { AuthenticatedWebSocket } from 'teleport/lib/AuthenticatedWebSocket'; import { MfaChallengeResponse } from 'teleport/services/mfa'; diff --git a/web/packages/teleport/src/lib/useMfa.ts b/web/packages/teleport/src/lib/useMfa.ts index 80690619bcebe..c6247d9844fcb 100644 --- a/web/packages/teleport/src/lib/useMfa.ts +++ b/web/packages/teleport/src/lib/useMfa.ts @@ -18,12 +18,13 @@ import { useState, useEffect } from 'react'; +import { Attempt } from 'shared/hooks/useAttemptNext'; + import { EventEmitterMfaSender } from 'teleport/lib/EventEmitterMfaSender'; import { TermEvent } from 'teleport/lib/term/enums'; import { parseMfaChallengeJson as parseMfaChallenge } from 'teleport/services/mfa/makeMfa'; import { DeviceType, MfaAuthenticateChallenge } from 'teleport/services/mfa'; import useReAuthenticate from 'teleport/components/ReAuthenticate/useReAuthenticate'; -import { Attempt } from 'shared/hooks/useAttemptNext'; import { MfaChallengeScope } from 'teleport/services/auth/auth'; export function useMfa(emitterSender: EventEmitterMfaSender): MfaState { @@ -73,6 +74,6 @@ export function makeDefaultMfaState(): MfaState { mfaChallenge: null, submitAttempt: {} as Attempt, mfaRequired: true, - submitWithMfa: (mfaType?: DeviceType, totp_code?: string) => null, + submitWithMfa: () => null, }; }