Google ReCaptcha v2 on Gatsby got Bypass

Hey @shuin,
I think there are a few different things happening here:

  1. You are submitting ...state, which is an object called data:

    this.state = {
      data,
    }
    

    But I don’t see where you are capturing the user inputs to the name, email, etc. fields with this code. You will need some way to capture that input and then update your state accordingly. That’s not Netlify-related, so it’s out of the scope of what we can help with, but maybe you’ll find this tutorial helpful? Simplifying React Forms with Hooks | Rangle.io

    This post may also be useful for you: Netlify + Gatsby + Google Recaptcha

  2. As for the reCAPTCHA, it actually seems to be working. If you submit the form without filling out the reCAPTCHA, the browser returns a 303; the submission is not successful. At the same time, there is no error thrown, and your site does redirect the user in a way that looks like the form submission was successful, so that’s definitely a bit confusing and something we should probably look into on our end in terms of user experience! But if you do fill out the reCAPTCHA, the submission is successful (even though it’s missing the inputs for the reason I described above).

Let us know if this helps!