PHPackages                             rabdavinci/yii2-module-recaptcha-v3 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. rabdavinci/yii2-module-recaptcha-v3

ActiveYii2-extension[Authentication &amp; Authorization](/categories/authentication)

rabdavinci/yii2-module-recaptcha-v3
===================================

This is reCAPTCHA v3 for Yii2.

1.0.6(3y ago)0108BSD-3-ClausePHP

Since Apr 9Pushed 3y agoCompare

[ Source](https://github.com/rabdavinci/yii2-module-recaptcha-v3)[ Packagist](https://packagist.org/packages/rabdavinci/yii2-module-recaptcha-v3)[ RSS](/packages/rabdavinci-yii2-module-recaptcha-v3/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (8)Used By (0)

[![Total Downloads](https://camo.githubusercontent.com/c68bd43e9f86c766be2449ede67f61a50a6b1244b94d1a2cff33697c7e43dbe0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726162646176696e63692f796969322d6d6f64756c652d7265636170746368612d76332e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rabdavinci/yii2-module-recaptcha-v3)

Yii2 reCAPTCHA v3
=================

[](#yii2-recaptcha-v3)

Adds [recaptcha-v3](https://developers.google.com/recaptcha/docs/v3) into yii2 project After fork fixed work with AJAX and implemented Global registration

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist rabdavinci/yii2-module-recaptcha-v3 "*"

```

or add

```
"rabdavinci/yii2-module-recaptcha-v3": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

add this to your components main.php

```
'components' => [
    ...
    'reCaptcha3' => [
        'class'      => 'rabdavinci\recaptcha3\ReCaptcha',
        'site_key'   => 'site_key_###',
        'secret_key' => 'secret_key_###',
    ],
```

and in your model

acceptance\_score the minimum score for this request (0.0 - 1.0) or null

```
public $reCaptcha;

public function rules()
{
 	return [
 		...
 		 [['reCaptcha'], \rabdavinci\recaptcha3\ReCaptchaValidator::className(), 'acceptance_score' => 0]
 	];
}
```

```
