Jump to content

[Human Verification] add support for recaptcha V3


Blesta Addons

Recommended Posts

  • 1 year later...
  • 2 years later...
  • 2 months later...

@Paul feel free to reach out to me....would be happy to share our implementation of v3, provided that Blesta officially endorses/adopts it (and for free).  It currently works with our CMS+ Plugin, but is easily adapted to Blesta core.  It provides full v3 implementation via expected action(s) and required score level to determine if successful response.  The v3 ReCaptcha class provides the html just like Blesta's v2 ReCaptcha does. Just like v2, v3 provides the client-side script for handling dynamic token validations with expected action (meaning it does provide the ability for client-side to request tokens on the fly).  Server-side, v3 ReCaptcha class provides server-side method to validate against that same expected action, and the minimum score required to be considered valid. It is all contained in a single v3 class.  The views that wish to use only need to do the same they already do for v2, albeit instead of $this->captcha, it is $this->recaptcha.  

I am able to speak with accuracy regarding the v3 implementation working as a Blesta core feature because I originally added this v3 variation to Blesta's /core/Util/Captcha/CaptchaFactory and added the v3 class file to /core/Util/Captcha/Captchas/RecaptchaV3.  Was able to then go to Settings -> Company -> General -> Human Verification, select ReCaptchaV3, and store the keys.  This added the ability for any controller to instantiate v3 just as easily as v2.  Our CMS+ Plugin was able to utilize it without issue.  I did later remove it from Blesta core and kept separate with CMS+.  Mainly because I prefer to NOT mod Blesta core, especially considering that future Blesta updates would wipe it every time anyway so why fight that.

v3 is very easy to implement.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...