How to Use the Recaptcha Module in Drupal 8

How to Use the Recaptcha Module in Drupal 8

The reCAPTCHA module for Drupal 8 integrates the reCAPTCHA service provided by Google with your Drupal site. This service provides additional protection by detecting if the user accessing your site is a real person or a robot.

Keep reading to learn how to use this module!

Step #1.- Install the Required Modules

  • Open the terminal application of your PC.
  • Type: composer require drupal/recaptcha
  • Click Extend.
  • Scroll down and enable Captcha, Image Captcha, and reCAPTCHA.
  • Click Install

How to Use the Recaptcha Module in Drupal 8


Step #2.- Configure the Module

  • Click Configuration > CAPTCHA module settings > reCAPTCHA.
  • Click the link register to reCAPTCHA.
  • Select v2 of reCAPTCHA.
  • Enter a valid domain name (this will not work on a local installation).
  • Accept the Terms.
  • Click Send / Ok.

How to Use the Recaptcha Module in Drupal 8

How to Use the Recaptcha Module in Drupal 8

You will get the Site Key and Secret Key. Paste them on the reCAPTCHA settings of your Drupal backend accordingly.

How to Use the Recaptcha Module in Drupal 8

How to Use the Recaptcha Module in Drupal 8

  • Scroll down and click Save configuration.
  • Click CAPTCHA Settings.
  • Change the default challenge type to reCAPTCHA.
  • Leave the other defaults.
  • Click Save configuration.

How to Use the Recaptcha Module in Drupal 8

Note: The image captcha module provides those “old-fashioned” challenges with an alphanumeric image.

How to Use the Recaptcha Module in Drupal 8

  • Click the Form settings tab.
  • Enable the Contact Message Feedback Form.
  • Click Edit.

How to Use the Recaptcha Module in Drupal 8

  • Add a proper name.
  • Select the reCAPTCHA challenge type.
  • Click Save.

How to Use the Recaptcha Module in Drupal 8


 Step #3.- Test the Contact Form

  • Use another browser to access the site as an anonymous user.
  • Navigate to yoursite/contact/feedback.

You should see the well-known “I’m not a robot checkbox”. If you click on it, you will get an image challenge to verify whether the user sending the form is human or not.

How to Use the Recaptcha Module in Drupal 8

I hope you liked this tutorial. Thanks for reading!

Author

  • Jorge Montoya

    Jorge lived in Ecuador and Germany. Now he is back to his homeland Colombia. He spends his time translating from English and German to Spanish. He enjoys playing with Drupal and other Open Source Content Management Systems and technologies.

0 0 votes
Article Rating
Subscribe
Notify of
2 Comments
Oldest
Newest
Inline Feedbacks
View all comments
baizid
baizid
3 years ago

Very true, Your content is always informative and I love to read them.

Thanks

2
0
Would love your thoughts, please comment.x
()
x