# Google reCAPTCHA v2

Google reCAPTCHA v2 checkbox.

| Field | Value |
|---|---|
| Addon id | `captcha-recaptcha-v2` |
| Kind | `captcha` |
| Provides | `recaptcha_v2` |
| Engine | `wasm` |
| ABI | `0.2.0` |
| Version | 0.1.0 |
| Author | MythicalSystems |
| Source | `extensions/addons/captcha-recaptcha-v2` |
| Permissions (shown at install) | `network.outbound` |

## Capabilities

| Capability | Value |
|---|---|
| [`http`](capabilities.md) | `www.google.com`, `www.recaptcha.net`, `$setting:verify_url` |
| [`secrets`](capabilities.md) | none |

## Events and hooks

| What | Value |
|---|---|
| Listens to (`events`) | none |
| Hooks | none |
| Emits | none |
| Mixins | none |
| Scheduled jobs | none |

## Settings and secrets

| Setting | Type | Required |
|---|---|---|
| `site_key` | `text` | no |
| `secret_key` | `secret` | no |
| `verify_url` | `text` | no |

Secrets (stored encrypted, never returned by the API): none.

Outbound HTTP allowed to: `www.google.com`, `www.recaptcha.net`, `$setting:verify_url`. `$server` is the hostname of the server configured for the product, `$setting:<key>` the host of that setting.

## addon.json

_extensions/addons/captcha-recaptcha-v2/addon.json_

```json
{
  "abi": "0.2.0",
  "author": "MythicalSystems",
  "capabilities": {
    "http": [
      "www.google.com",
      "www.recaptcha.net",
      "$setting:verify_url"
    ],
    "secrets": []
  },
  "description": "addons.desc.captcha.recaptcha_v2",
  "engine": "wasm",
  "id": "captcha-recaptcha-v2",
  "kind": "captcha",
  "name": "Google reCAPTCHA v2",
  "permissions": [
    "network.outbound"
  ],
  "provides": "recaptcha_v2",
  "settings": [
    {
      "default": "",
      "key": "site_key",
      "kind": "text",
      "label": "addons.captcha.setting.site_key",
      "required": false
    },
    {
      "default": "",
      "key": "secret_key",
      "kind": "secret",
      "label": "addons.captcha.setting.secret_key",
      "required": false
    },
    {
      "default": "",
      "key": "verify_url",
      "kind": "text",
      "label": "addons.captcha.setting.verify_url",
      "required": false
    }
  ],
  "version": "0.1.0",
  "wasm": "addon.wasm"
}
```

