Enable recaptcha on client sign up

Important

ReCaptcha feature works only with Google reCaptcha V2

In order to enable recaptcha on Fleio client sign up you will have to:

  1. Register a new site in the google recaptcha admin panel. We will need the site key and secret key.

  2. Add the site key in the enduser.config.json file:

fleio edit enduser.config.json
...
    "logoutRedirect": null,
    "usernameInputLabel": null,
    "reCaptchaSiteKey" : "HERE WE PASTE THE SITE KEY"
  }
  1. Add the secret key at the end of the settings.py file:

fleio edit settings.py
RECAPTCHA_SECRET = 'HERE WE PASTE THE SECRET KEY'

Save and press Y to restart fleio services.

  1. Insert the captcha script into the enduser index.html file.

We need to add the following script inside the /var/webapps/fleio/frontend/enduser/index.html:

<script src="https://www.google.com/recaptcha/api.js?render=explicit" async defer></script>

This needs to be done by following this example.

If everything was properly configured, you should be able to see the recaptcha verification on the client sign up page:

../_images/recapctha_signup.png