Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reCAPTCHA Token Failed on Verify (incorrect-captcha-sol) #22

Closed
willymulyana opened this issue Jun 14, 2022 · 1 comment
Closed

reCAPTCHA Token Failed on Verify (incorrect-captcha-sol) #22

willymulyana opened this issue Jun 14, 2022 · 1 comment

Comments

@willymulyana
Copy link

Hi

I have setup my reCAPTCHA v3 and use this library. But when try to verify the token (following method from this link) I always getting failed response:

{
    "success": false,
    "error-codes": [
        "incorrect-captcha-sol"
    ]
}

I tried to register and use package name or bundle ID as well as web host as domain, but still get same result.
Any idea on how to resolve this issue?
Also thanks for this library.

@willymulyana willymulyana changed the title reCAPTCHA Token Failed to be Verified (incorrect-captcha-sol) reCAPTCHA Token Failed on Verify (incorrect-captcha-sol) Jun 14, 2022
@willymulyana
Copy link
Author

I managed to make it work!

Solution is, while already setup recaptcha in google panel and add app bundleId as domain. Then just need to put it in ReCaptchaV3 component as captchaDomain={'https://' + bundleId}, or if using react-native-device-info can put as captchaDomain={'https://' + DeviceInfo.getBundleId()}.

So it just missing protocol (http/https) in captchaDomain if using bundleId as domain. As it's mobile app I didn't realize it soon as it pretty much not make sense to combine protocol with bundleId.

Hopefully it can help someone who stumble with this issue, and maybe can be documented.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant