Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Oliver Boardman 19 posts 130 karma points
    Apr 24, 2018 @ 09:27
    Oliver Boardman
    0

    reCAPTCHA v2 for a noob

    Hi. I'm pulling my hair out over this now. I have Umbraco 7.4.3 and using Umbraco forms 4.3.0-beta and installed reCAPTCHAfieldforUmbracoForms_1.0.4

    I have added the following lines to web.config:

    <add key="RecaptchaSiteKey" value="6LooDFIUAAAAAFoo-o9ooooooo_64-p_oUAo4" /><add key="RecaptchaPrivateKey" value="6LooDFIUOOOOOOGoV3fZOoooooooo1tV1zLISlv4x" />
    

    After creating the account for the website on google and added the:

    <script src='https://www.google.com/recaptcha/api.js'></script>
    

    to the section of the page in question but i'm still getting the:ERROR for site owner: Invalid domain for site key

    What am I missing?

  • Levi Patel 3 posts 73 karma points
    May 11, 2018 @ 01:44
    Levi Patel
    1

    Hi Oliver,

    Try putting the keys in UmbracoForms.config rather than web.config.

    For example:

    <setting key="RecaptchaPublicKey" value="XXXXXX" />
    <setting key="RecaptchaPrivateKey" value="XXXXXX" />
    
  • Oliver Boardman 19 posts 130 karma points
    May 21, 2018 @ 10:06
    Oliver Boardman
    0

    Hi Levi,

    Thanks for the reply. Sorry for the delay in response. I have been away. Just applied that method and yet still the same issue

  • Levi Patel 3 posts 73 karma points
    May 21, 2018 @ 22:15
    Levi Patel
    0

    Hi Oliver,

    That's no problem at all.

    Recaptcha v2 is actually built into recent versions of Umbraco Forms (at least from 7.0.2, which I'm running), so a plugin is no longer necessary.

    Is there a reason you're using that particular version of Umbraco Forms?

    I would suggest removing the plugin, updating to the latest version of Umbraco Forms, then configuring it as I described in my last comment.

  • Dan Diplo 1554 posts 6205 karma points MVP 5x c-trib
    May 11, 2018 @ 10:01
    Dan Diplo
    1

    In the reCaptcha admin - https://www.google.com/recaptcha/admin - you need to whitelist the domain(s) that are valid for your reCaptcha. So, for example, if you site is www.example.com you'd add example.com to the list of domains, one per line.

    recaptcha admin

  • Oliver Boardman 19 posts 130 karma points
    May 11, 2018 @ 10:08
    Oliver Boardman
    0

    I've done that too enter image description here

    enter image description here

  • Vidar Solberg 7 posts 145 karma points
    Jul 02, 2018 @ 07:37
    Vidar Solberg
    2

    Hi Oliver

    Hopefully you have sorted this out by now, but if not (and for others), double check the following.

    Add/update these settings in App_Plugins\UmbracoForms\UmbracoForms.config. Make sure the keys are the ones from the related reCAPTCHA site at your Google account.

    (And keep them secret!)

    reCaptcha keys

    <setting key="RecaptchaPublicKey" value="SITE-KEY" />
    <setting key="RecaptchaPrivateKey" value="SECRET-KEY" />
    

    Add all relevant domains to Google's domain list, including localhost, *.azurewebsites.net or whatever domains you use for testing and production. You don't need to add subdomains (like www).

Please Sign in or register to post replies

Write your reply to:

Draft