diff --git a/src/pages/GoogleAuthCallback.tsx b/src/pages/GoogleAuthCallback.tsx index c7dfe0c..27d18b3 100644 --- a/src/pages/GoogleAuthCallback.tsx +++ b/src/pages/GoogleAuthCallback.tsx @@ -17,6 +17,7 @@ import { } from "../api/users"; import { useTranslation } from "../hooks/useTranslation"; import { setSessionTokens } from "../lib/session"; +import { AuthOtpInput } from "./auth/AuthOtpInput"; type GoogleStep = "loading" | "collect_mobile" | "claim_required" | "error"; type CooldownKey = "otpSend" | "otpVerify"; @@ -106,6 +107,7 @@ export default function GoogleAuthCallback() { if (payload.status === "claim_required") { setMobile(payload.mobile); + setOtpCode(""); setGoogleEmail(payload.email); setFlowResolution(payload.resolution); setMobileHint(payload.mobile_hint ?? null); @@ -325,7 +327,7 @@ export default function GoogleAuthCallback() { )} {step === "collect_mobile" && ( -
+
@@ -370,7 +372,7 @@ export default function GoogleAuthCallback() { )} {step === "claim_required" && ( - +

{flowResolution === "existing_email_claim" @@ -379,19 +381,17 @@ export default function GoogleAuthCallback() { ? t.login.google.mobileClaimDescription(mobile) : t.login.sentCodeDesc(mobile)}

- { - setOtpCode(event.target.value) + disabled={loading} + onChange={(value) => { + setOtpCode(value) setErrorMessage("") }} - maxLength={6} - disabled={loading} - className="h-11 text-center text-lg tracking-widest" + onComplete={(value) => { + setOtpCode(value) + }} />