fix: only auto-toggle biometrics prompt if user hasn't interacted

This commit is contained in:
Aman Harwara
2022-10-28 16:07:26 +05:30
parent ba231c633f
commit 02ad46147d

View File

@@ -42,11 +42,15 @@ const ChallengeModalPrompt: FunctionComponent<Props> = ({
} }
} }
if (typeof values[prompt.id].value === 'boolean') {
return
}
biometricsButtonRef.current?.click() biometricsButtonRef.current?.click()
} else { } else {
inputRef.current?.focus() inputRef.current?.focus()
} }
}, [application, prompt.validation]) }, [application, prompt.id, prompt.validation, values])
useEffect(() => { useEffect(() => {
if (!application.isNativeMobileWeb()) { if (!application.isNativeMobileWeb()) {