2.1 KiB
iNDX reCAPTCHA v2 Prep - 2026-06-08
Context
During the paddleNET launch, the contact form initially used the wrong reCAPTCHA key type. The visible checkbox widget requires a classic reCAPTCHA v2 checkbox key, not an Enterprise/score-style key.
The same correction was prepared for iNDX so the future iNDX contact form work can use the correct key type.
Key Lesson
If the page uses this classic checkbox widget:
<div class="g-recaptcha" data-sitekey="..."></div>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
then the Google key must be:
reCAPTCHA v2 checkbox
Do not use a key whose integration instructions show:
grecaptcha.enterprise.execute(...)
That is the Enterprise/action-score style flow and requires different frontend and backend verification code.
Error Seen On paddleNET
ERROR for site owner: Invalid key type
Root cause:
- Frontend widget expected v2 checkbox.
- Site key was not v2 checkbox.
iNDX Action Completed
A new v2 checkbox key was created for iNDX and the old v3-style key was removed/replaced in Google reCAPTCHA management.
Secrets should not be committed to this repo. Only the public site key belongs in HTML/source. The secret key belongs in the production server env file.
Implementation Pattern For iNDX
Frontend source should use the public site key:
<div class="g-recaptcha" data-sitekey="<indx-v2-checkbox-site-key>"></div>
Backend env should use the private secret:
RECAPTCHA_SECRET_KEY=<indx-v2-checkbox-secret-key>
Backend verification can use classic siteverify:
https://www.google.com/recaptcha/api/siteverify
Future Similar Task Checklist
- Decide which reCAPTCHA integration the code uses.
- For visible checkbox, create/select reCAPTCHA v2 checkbox key.
- Add both root and www domains.
- Put public site key in HTML/source.
- Put secret key only in server env.
- Restart backend after changing secret.
- Hard refresh browser and test the widget.
- Submit a real form to confirm backend verification succeeds.