Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use recaptcha v2 on localhost?

Using the Google recaptcha version 2 for my wordpress, I added the "localhost" domain (I tried "127.0.0.1" as well) on my google account side and I got keys but on my client-side I got this error :

ERROR: Invalid domain for site key

  • The owner email is the correct gmail email
  • The Site key was correct

Is there a way to test recaptcha (version 2) on Localhost (using virtualhosts) ?

like image 614
J.BizMai Avatar asked Sep 26 '17 08:09

J.BizMai


1 Answers

I found this solution.

Using these keys below, you can do your tests on localhost, these keys are provided in the above link for testing purposes by google:

Site key: 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
Secret key: 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe

Google adds a message on recaptcha to prevent users and the administrator that keys are just for tests.

like image 173
J.BizMai Avatar answered Sep 24 '22 20:09

J.BizMai