diff --git a/web/packages/teleport/src/Account/ChangePasswordWizard/ChangePasswordWizard.story.tsx b/web/packages/teleport/src/Account/ChangePasswordWizard/ChangePasswordWizard.story.tsx index 07283ae6c1c8d..3ec850a0aeba7 100644 --- a/web/packages/teleport/src/Account/ChangePasswordWizard/ChangePasswordWizard.story.tsx +++ b/web/packages/teleport/src/Account/ChangePasswordWizard/ChangePasswordWizard.story.tsx @@ -23,10 +23,11 @@ import Dialog from 'design/Dialog'; import { createTeleportContext } from 'teleport/mocks/contexts'; import { ContextProvider } from 'teleport'; -import { MfaDevice } from 'teleport/services/mfa'; +import { MfaDevice, WebauthnAssertionResponse } from 'teleport/services/mfa'; import { ChangePasswordStep, + ChangePasswordWizardStepProps, ReauthenticateStep, createReauthOptions, } from './ChangePasswordWizard'; @@ -107,12 +108,16 @@ const stepProps = { flowLength: 2, refCallback: () => {}, - // Other props - reauthOptions: defaultReauthOptions, - reauthMethod: defaultReauthOptions[0].value, - credential: { id: '', type: '' }, - onReauthMethodChange() {}, - onAuthenticated() {}, + // Shared props + reauthMethod: 'mfaDevice', onClose() {}, onSuccess() {}, -}; + + // ReauthenticateStepProps + reauthOptions: defaultReauthOptions, + onReauthMethodChange() {}, + onWebauthnResponse() {}, + + // ChangePasswordStepProps + webauthnResponse: {} as WebauthnAssertionResponse, +} satisfies ChangePasswordWizardStepProps; diff --git a/web/packages/teleport/src/Account/ChangePasswordWizard/ChangePasswordWizard.tsx b/web/packages/teleport/src/Account/ChangePasswordWizard/ChangePasswordWizard.tsx index 4303e01768e78..3a66e65a070ce 100644 --- a/web/packages/teleport/src/Account/ChangePasswordWizard/ChangePasswordWizard.tsx +++ b/web/packages/teleport/src/Account/ChangePasswordWizard/ChangePasswordWizard.tsx @@ -147,7 +147,7 @@ const wizardFlows = { withoutReauthentication: [ChangePasswordStep], }; -type ChangePasswordWizardStepProps = StepComponentProps & +export type ChangePasswordWizardStepProps = StepComponentProps & ReauthenticateStepProps & ChangePasswordStepProps;