diff --git a/frontend/src/components/auth/totp-form.tsx b/frontend/src/components/auth/totp-form.tsx index 15e490c..8168552 100644 --- a/frontend/src/components/auth/totp-form.tsx +++ b/frontend/src/components/auth/totp-form.tsx @@ -26,12 +26,14 @@ export const TotpForm = (props: Props) => { const handleChange = (e: React.ChangeEvent) => { const value = e.target.value.replace(/\D/g, "").slice(0, 6); - form.setValue("code", value, { shouldDirty: true, shouldValidate: true }); + form.setValue("code", value, { shouldDirty: true, shouldValidate: false }); if (value.length === 6) { form.handleSubmit(onSubmit)(); } }; + // Note: This is not the best UX, ideally we would want https://github.com/guilhermerodz/input-otp + // but some password managers cannot autofill the inputs (see #92) so, simple input it is return (
@@ -43,8 +45,6 @@ export const TotpForm = (props: Props) => { { {t("totpTitle")} {t("totpSubtitle")} - + totpMutation.mutate(values)}