GATSBY_ prefix on Recaptcha
gixxerblade opened this issue · comments
Stephen Clark commented
The README.md states "Important: the environment variables need to be called SITE_RECAPTCHA_KEY and SITE_RECAPTCHA_SECRET for the Netlify backend to find them. If you add a GATSBY_ prefix to the variable names, the Netlify backend won't recognize them, the reCAPTCHA verification will fail, and your form submissions won't be stored."
Your L6 references the GATSBY_ prefix. Is it needed or not?
const RECAPTCHA_KEY = process.env.GATSBY_APP_SITE_RECAPTCHA_KEY
if (typeof RECAPTCHA_KEY === 'undefined') {
throw new Error(`
Env var GATSBY_APP_SITE_RECAPTCHA_KEY is undefined!
You probably forget to set it in your Netlify build environment variables.
Make sure to get a Recaptcha key at https://www.netlify.com/docs/form-handling/#custom-recaptcha-2-with-your-own-settings
Note this demo is specifically for Recaptcha v2
`)
}
swyx.io commented