{openCard.value}
+{openCard.description}
++ {t("stepAnnouncement", { current: isDone ? "3" : scanVisible ? "2" : "1", total: "3" })} +
{/* ── Idle / Enabling ──────────────────────────────────────────── */} {(step === "idle" || step === "enabling") && ( @@ -229,6 +281,18 @@ export function TwoFactorAuthSetup({ onChange={(e) => { setCode(e.target.value.replace(/\D/g, "").slice(0, 6)); setError(null); + setIsNetworkError(false); + }} + onKeyDown={(e) => { + if (e.key === "Enter" && !isVerifying && code.length === 6) { + e.preventDefault(); + void handleVerify(); + } else if (e.key === "Escape") { + e.preventDefault(); + setCode(""); + setError(null); + setIsNetworkError(false); + } }} disabled={isVerifying} aria-busy={isVerifying} @@ -244,22 +308,33 @@ export function TwoFactorAuthSetup({ )} -