Skip to content

Commit

Permalink
Fix lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joerger committed Dec 11, 2024
1 parent 53dd5ba commit 213322c
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 1 addition & 4 deletions web/packages/teleport/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 1 addition & 4 deletions web/packages/teleport/src/lib/EventEmitterMfaSender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
1 change: 0 additions & 1 deletion web/packages/teleport/src/lib/tdp/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 0 additions & 1 deletion web/packages/teleport/src/lib/term/tty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
5 changes: 3 additions & 2 deletions web/packages/teleport/src/lib/useMfa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -73,6 +74,6 @@ export function makeDefaultMfaState(): MfaState {
mfaChallenge: null,
submitAttempt: {} as Attempt,
mfaRequired: true,
submitWithMfa: (mfaType?: DeviceType, totp_code?: string) => null,
submitWithMfa: () => null,
};
}

0 comments on commit 213322c

Please sign in to comment.