prevent webview from showing during device attest (#9425)
This commit is contained in:
@@ -21,12 +21,14 @@ export function CaptchaWebView({
|
|||||||
url,
|
url,
|
||||||
stateParam,
|
stateParam,
|
||||||
state,
|
state,
|
||||||
|
onComplete,
|
||||||
onSuccess,
|
onSuccess,
|
||||||
onError,
|
onError,
|
||||||
}: {
|
}: {
|
||||||
url: string
|
url: string
|
||||||
stateParam: string
|
stateParam: string
|
||||||
state?: SignupState
|
state?: SignupState
|
||||||
|
onComplete: () => void
|
||||||
onSuccess: (code: string) => void
|
onSuccess: (code: string) => void
|
||||||
onError: (error: unknown) => 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
|
// 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
|
wasSuccessful.current = true
|
||||||
|
onComplete()
|
||||||
const now = Date.now()
|
const now = Date.now()
|
||||||
const timeTaken = now - startedAt.current
|
const timeTaken = now - startedAt.current
|
||||||
if (timeTaken < MIN_DELAY) {
|
if (timeTaken < MIN_DELAY) {
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ function StepCaptchaInner({
|
|||||||
url={url}
|
url={url}
|
||||||
stateParam={stateParam}
|
stateParam={stateParam}
|
||||||
state={state}
|
state={state}
|
||||||
|
onComplete={() => setCompleted(true)}
|
||||||
onSuccess={onSuccess}
|
onSuccess={onSuccess}
|
||||||
onError={onError}
|
onError={onError}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user