Google reCAPTCHA

Google reCAPTCHA

Today we are happy to release Pagekit 1.0.15 which implements Google reCAPTCHA and makes your Pagekit website safe and spam-free. As you probably already now, reCAPTCHA is a Google service that protects your website against computerized abuse and spam. The user registration and blog comments are now protected with the Google reCAPTCHA V2 Invisible. It does not interrupt the usual registration flow and does not require any modifications to your templates.

To use the reCAPTCHA on your website, you can register and get an API key pair from the official website. Simply copy the keys and add them in the Pagekit settings.

reCAPTCHA for Pagekit Extentions

You can also use reCAPTCHA in your Pagekit extension. To do that, add an annotation to the action in the controller of the page which should display reCAPTCHA. In the annotation you can specify which POST routes should be protected. Pagekit will inject the reCAPTCHA script automatically and execute it on every AJAX call to the routes specified in the annotations.

/**
 * @Captcha(route="@user/registration/register")
 */
public function indexAction() 
{
	//...
}

The following annotation is needed to protect an POST action with reCAPTCHA

/**
 * @Request({"user": "array")
 * @Captcha(verify="true")
 */
public function registerAction($data)
{
	//...
}
Hanna
Posted by Hanna
{{ message }}

{{ 'Comments are closed.' | trans }}