import { KeyRound } from 'lucide-react'; import React from 'react'; import { useTranslation } from '../../i18n'; import { mfaCodeInputProps } from './mfaCodeInput'; interface MfaCodeStepProps { /** The account being signed in, kept in the form for password managers. */ email: string; code: string; onCode: (code: string) => void; inputStyle: React.CSSProperties; onBack: () => void; } /** The login's second step: the one-time or backup code, and the way back. */ export default function MfaCodeStep({ email, code, onCode, inputStyle, onBack }: MfaCodeStepProps) { const { t } = useTranslation(); return (
{/* The account the code belongs to, for password managers: they match a one-time code to a saved login through the username in the same form, and the email field is gone in this step. */}
) => (e.target.style.borderColor = '#111827')} onBlur={(e: React.FocusEvent) => (e.target.style.borderColor = '#e5e7eb')} />

{t('login.mfaHint')}

); }