collective / collective.volto.formsupport

Enable support for customizable forms in Volto
GNU General Public License v2.0
2 stars 8 forks source link

Recaptcha and Hcaptcha integration #13

Closed erral closed 2 years ago

erral commented 2 years ago

Right now recaptcha and hcaptcha integration is included just in the front-end but not in the backend. Both recaptcha and hcaptcha require, according to their documentation, backend verification of the front-end values, which is not available right now.

erral commented 2 years ago

This can be related to having some kind of generic way of handling captcha, which is required in case we manually inject any captcha solution in the front-end.

cekk commented 2 years ago

You're absolutely right. For another product (used both in volto and classic Plone) i managed recaptcha: https://github.com/RegioneER/rer.customersatisfaction/#captcha-protection

We should do something similar here too probably.

mamico commented 2 years ago

@cekk @erral @giuliaghisini

A try to complete the captcha support here:

https://github.com/collective/collective.volto.formsupport for the backend with https://github.com/collective/volto-form-block/tree/captcha for the frontend

Quick instructions:

  1. in the backend add, install and configure also plone.formwidget.recaptcha (or plone.formwidget.hcaptcha, untested by me)
  2. for the frontend no more required to add captcha public key environment, but you need to choose the captcha provider to use in the form block properties

Trying the code and any suggestions are welcome.

erral commented 2 years ago

This was fixed in https://github.com/collective/collective.volto.formsupport/pull/18 and https://github.com/collective/collective.volto.formsupport/commit/24846b30f29e67ab54a82926ec082cc13d21498b