allow chars in 2fa input form closes #3532

This commit is contained in:
miloschwartz
2026-08-06 11:39:06 -04:00
parent 835a30cffe
commit 82b86263dc
2 changed files with 18 additions and 14 deletions
+13 -11
View File
@@ -24,19 +24,21 @@ export function ContactSalesBanner() {
<ExternalLink className="size-3.5 shrink-0" />
</Link>
{" " + t("contactSalesOr") + " "}
<Link
href="https://pangolin.net/contact"
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center gap-1 font-medium text-black-600 underline"
>
{t("contactSalesContactUs")}
<ExternalLink className="size-3.5 shrink-0" />
</Link>
.
<span className="whitespace-nowrap">
<Link
href="https://pangolin.net/contact"
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center gap-1 font-medium text-black-600 underline"
>
{t("contactSalesContactUs")}
<ExternalLink className="size-3.5 shrink-0" />
</Link>
.
</span>
</span>
</div>
</div>
</div>
);
}
}
+5 -3
View File
@@ -13,7 +13,7 @@ import {
import { InputOTP, InputOTPGroup, InputOTPSlot } from "./ui/input-otp";
import { Alert, AlertDescription } from "@app/components/ui/alert";
import { useTranslations } from "next-intl";
import { REGEXP_ONLY_DIGITS } from "input-otp";
import { REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp";
const MFA_OTP_INPUT_ID = "mfa-otp-code";
@@ -82,9 +82,11 @@ export default function MfaInputForm({
maxLength={6}
{...field}
autoComplete="one-time-code"
inputMode="numeric"
inputMode="text"
autoFocus
pattern={REGEXP_ONLY_DIGITS}
pattern={
REGEXP_ONLY_DIGITS_AND_CHARS
}
onChange={(value: string) => {
field.onChange(value);
if (value.length === 6) {