1 import type { AuthTypes } from "@medusajs/types"
2 import AvatarBox from "../../../components/common/logo-box/avatar-box"
3 import { MfaChallengeForm } from "./mfa-challenge-form"
4
5 type MfaChallengeCardProps = {
6 challenge: AuthTypes.AuthMfaChallengeDTO
7 onSuccess: (token: string) => void | Promise<void>
8 onBack?: () => void
9 }
10
11 export const MfaChallengeCard = ({
12 challenge,
13 onSuccess,
14 onBack,
15 }: MfaChallengeCardProps) => {
16 return (
17 <div className="m-4 flex w-full max-w-[280px] flex-col items-center">
18 <AvatarBox />
19 <MfaChallengeForm
20 challenge={challenge}
21 onSuccess={onSuccess}
22 onBack={onBack}
23 />
24 </div>
25 )
26 }