recaptcha icon indicating copy to clipboard operation
recaptcha copied to clipboard

Error "Invalid domain" when in iframe srcdoc only

Open daraz999 opened this issue 5 years ago • 7 comments
trafficstars

Good day!

We created a recaptcha without "Verify the origin of reCAPTCHA solutions": Screenshot 2020-05-13 at 11 22 02

Now, it works great in most cases, but one of our use cases requires recaptcha to be placed in iframe srcdoc attribute. That gives us error Invalid domain for site key

Here is jsfiddle with repro with working example (normal recaptcha) and not working example (recaptcha in srcdoc): https://jsfiddle.net/dariusmailerlite/7026Ldpe/

daraz999 avatar May 13 '20 08:05 daraz999

I got the same issue. Really need help!

YuqingLethe avatar Oct 06 '20 14:10 YuqingLethe

@daraz999 we're facing the same issue. Were you able to find a workaround?

punnie avatar Oct 07 '20 11:10 punnie

@daraz999 we're facing the same issue. Were you able to find a workaround?

No workaround...

daraz999 avatar Oct 12 '20 06:10 daraz999

I take it there is still no solve for this?

Hopefully anyone looking for this will find my answer, but this came to light to me because GoDaddy's site building loads custom JavaScript this way, so will not be able to load reCaptcha's.

tomhamiltonstubber avatar Dec 14 '20 19:12 tomhamiltonstubber

Same issue by me, haven't found any workaround yet.

imiksi avatar Jan 07 '21 15:01 imiksi

Having same issue , no workaround found yet.

puneetkumarans avatar Oct 13 '23 05:10 puneetkumarans

Was anyone able to find a workaround? I'm running into a similar issue where recaptcha is loaded within the srcdoc. I successfully retrieve the token but when I post the token, siteKey, and expectedAction to https://recaptchaenterprise.googleapis.com, I only receive BROWSER_ERROR with no additional context.

jrwoody avatar Dec 08 '23 19:12 jrwoody