fix: auto-submit OTP code on completion in get-started verification step

Add onComplete handler to OtpInput so the verification code auto-submits
when all 6 digits are entered, matching the existing behavior in
LoginOtpStep and OtpStep components.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ramirez 2026-03-05 18:19:45 +09:00
parent 35ba8ab26a
commit 9754c73b64

View File

@ -24,6 +24,10 @@ export function VerificationStep() {
setCode(value);
};
const handleCodeComplete = (value: string) => {
send({ type: "VERIFY_CODE", code: value });
};
const handleVerify = () => {
if (code.length === 6) {
send({ type: "VERIFY_CODE", code });
@ -53,6 +57,7 @@ export function VerificationStep() {
<OtpInput
value={code}
onChange={handleCodeChange}
onComplete={handleCodeComplete}
disabled={loading}
error={error ?? undefined}
autoFocus