prevent webview from showing during device attest (#9425)

This commit is contained in:
Samuel Newman
2025-11-20 17:54:02 +02:00
committed by GitHub
parent f5a5eee32c
commit 2792b4cef0
2 changed files with 4 additions and 0 deletions
@@ -21,12 +21,14 @@ export function CaptchaWebView({
url,
stateParam,
state,
onComplete,
onSuccess,
onError,
}: {
url: string
stateParam: string
state?: SignupState
onComplete: () => void
onSuccess: (code: string) => void
onError: (error: unknown) => void
}) {
@@ -71,6 +73,7 @@ export function CaptchaWebView({
// We want to delay the completion of this screen ever so slightly so that it doesn't appear to be a glitch if it completes too fast
wasSuccessful.current = true
onComplete()
const now = Date.now()
const timeTaken = now - startedAt.current
if (timeTaken < MIN_DELAY) {
+1
View File
@@ -156,6 +156,7 @@ function StepCaptchaInner({
url={url}
stateParam={stateParam}
state={state}
onComplete={() => setCompleted(true)}
onSuccess={onSuccess}
onError={onError}
/>