单击验证后,ReCAPTCHA 卡在禁用验证上

问题描述 投票:0回答:1

My recaptcha on my web app is stuck like this 我正在使用 react-google-recaptcha

我不知道你尝试了什么。我希望它能转移到我的代码的下一部分

This is the console

这是部分代码:

// what code is returning
            <ReCAPTCHA
                sitekey={RECAPTCHA_SITE_KEY}
                size="invisible"
                ref={recaptchaRef}
            />

//Handle submit
async function handleSubmit(event) {
        event.preventDefault()
        const key = await recaptchaRef.current.executeAsync()
        ...

reactjs recaptcha react-google-recaptcha
1个回答
0
投票

使用后需要重置验证码

executeAsync

    async function handleSubmit(event) {
        event.preventDefault()
        const key = await recaptchaRef.current.executeAsync()
        recaptchaRef.current.reset()

© www.soinside.com 2019 - 2024. All rights reserved.