DEV Community

Discussion on: Adding reCaptcha v3 to a Rails app without a gem

Collapse
 
morinoko profile image
Felice Forby

Hmm, it does look like the Google documentation says to make a POST request...

Honestly, when I wrote this (and still now), I had a really hard time understanding how the ReCaptcha worked, so I had to reference some other articles. Those articles all used Net::HTTP.get_response(uri) to get back the verification response.

You could try to make it a POST request instead and see how it works. I haven't tried it myself yet!

Collapse
 
ben_stegeman_6497b156504d profile image
Ben Stegeman • Edited

I'm implementing a reCAPTCHA currently. I believe it is supposed to be a POST request.

In fact, it's a little insecure to pass the secret key (and the token to a lesser extent) via a GET request. The query parameters at the end of the URL are encrypted in transit (so long as HTTPS is used,) but they can still show up in server logs, etc.

Doesn't apply here, but those query parameters also show up in browser history! GET should never be used to transmit sensitive information over the web.