This guide provides step-by-step instructions for configuring your LANSA web applications to use the Google reCAPTCHA v2 anti-spam technology.

You would have most likely seen the following checkbox in many of the websites you visited:

Pre-requisites

You’d need to install the Integration Library package using the LANSA Package Manager.
See this usage guide for how to use the LANSA Package Manager.

Running the Sample Application


Before you can run this sample, follow the steps outlined in the rest of this guide.

Registering a New Site

Before you can put a reCAPTCHA on your website, you’d need to register your website with Google first.

  • Register Your Website Domains with Google
    Navigate to the following URL (you will be prompted to enter your Google user ID and password)
    https://www.google.com/recaptcha/admin/create
  • Enter a label for your website & choose the right reCAPTCHA type
    Make sure you pick reCAPTCHA v2 for the type.

    If you want to find out what and why Google’s asking for the information, place your mouse over the (i) icon.

  • Add your domains
    Add the website domains you are going to use the reCAPTCHA on.
    Make sure you add localhost so you can test the reCAPTCHA on your computer.

  • Accept Terms & Conditions and submit
  • Copy the new site key and secret
    After pressing the Submit button, you should be presented with the following screen. Don’t close your browser as you will need to copy the keys into the configuration tool in the next section.

Configuring the Site Key and Secret