• Resolved bkwineper

    (@bkwineper)


    I am using Wordfence to improve login security with recaptcha v3. When I copy our site from the Production (Live) environment to the Development environment this causes a problem: recaptcha v3 blocks back-end login since the recaptcha key now does not correspond to the domain it has been registered for (it is obviously registered for the live site but now it is copied over to the Dev site).

    This is perhaps logical and as expected but still rather annoying.

    Is there a way around this, other than deactivating the Wordfence login security on the live site before copying from Production to Development? One really does not want to disable Wordfence in a live environment if one can avoid it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support WFAdam

    (@wfadam)

    Hello @bkwineper and thanks for reaching out to us!

    Are you using a custom login page by chance? Our Google reCAPTCHA feature currently only works for the default WordPress login and registration pages and may not work on custom login and registration pages

    https://www.wordfence.com/help/login-security/#captcha-options is a good reference for captcha options.

    Let me know if this helps!

    Thanks!

    Thread Starter bkwineper

    (@bkwineper)

    Hi,

    Maybe I wasn’t very clear in my explanation.

    It works fine, no problem, on the Live site. There is no issue at all there. (I do use the standard login page.)

    The issue is when I make a copy of the Live site to the Development environment. I use WPEngine hosting and they have a very easy way to create copies of the environments for development and testing.

    The live site URL in this case is bkwine.com, publicly accessible and where I have registered the reCaptcha site keys.

    When I make a copy of it to the Development environment, the URL changes to [something].wpengine.com and I can do development and testing there in a protected and not publicly accessible environment.

    But then, when I try and login to the Development site, on the URL [something].wpengine.com/wp-admin/, reCaptcha blocks it. Actually, reCaptcha blocks everything since it says “ERROR for site owner: Invalid domain for site key”. As a result, the backend is inaccessible on the Development site.

    This is, of course, totally natural since the site key is for the Live URL and not the Development URL.

    The only way I have found to solve this is to deactivate Wordfence on the Live site before making a copy to Development.

    This is a bit of a hassle but works fine.

    The big drawback, though, is that I do have to deactivate Wordfence on a live site for a period of time. Then, the copy-from-live-to-development does not have Wordfence (and reCaptcha) active and I can login to the Dev site.

    It would be better if there was a solution that did not entail deactivating Wordfence on a live site.

    I was guessing that many other people must have had the same issue and that you might have found a way around it.

    Plugin Support WFAdam

    (@wfadam)

    Hello again @bkwineper

    Sorry about the confusion. You can actually add the Dev URL in your Google Recaptcha account for those Captcha Keys. This should then allow the page to work the way you need it to.

    Let me know if this helps!

    Thanks!

    Thread Starter bkwineper

    (@bkwineper)

    Hi Adam,

    Wow, I did not know that (and apparently WPEngine neither – I asked them).

    I’ll check that out tomorrow. Tied up in other things rest of the day today.

    /Per

    Plugin Support WFAdam

    (@wfadam)

    Let us know if you have any more questions @bkwineper

    Always a pleasure!

    Thanks again!

    Thread Starter bkwineper

    (@bkwineper)

    Just to let you know:

    It worked perfectly!!

    It’s always a bit tricky to set up reCaptcha but once I found the right place to do it, it was easy to add an additional URL.

    Very many thanks for this tip! ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WF blocks login in Development environment due to reCaptcha v3’ is closed to new replies.