Merge pull request #612 from lxfrdl/feat/enhance_2fa_login

feat: enhance 2fa login usability
This commit is contained in:
Owen Schwartz 2025-04-28 18:18:57 -04:00 committed by GitHub
commit c543376a0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -215,6 +215,12 @@ export default function LoginForm({ redirect, onLogin }: LoginFormProps) {
pattern={ pattern={
REGEXP_ONLY_DIGITS_AND_CHARS REGEXP_ONLY_DIGITS_AND_CHARS
} }
onChange={(e) => {
field.onChange(e);
if (e.target.value.length === 6) {
mfaForm.handleSubmit(onSubmit)();
}
}}
> >
<InputOTPGroup> <InputOTPGroup>
<InputOTPSlot <InputOTPSlot