PHPackages                             ahorn/friendlycaptcha - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. ahorn/friendlycaptcha

ActiveNeos-package[Validation &amp; Sanitization](/categories/validation)

ahorn/friendlycaptcha
=====================

Form Element to integrate Friendly Captcha into the Flow Form Framework

2.4.2(1mo ago)110.6k↓16.5%3GPL-3.0-or-laterPHP

Since Jul 27Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/ahornlabs/friendly-captcha-neos)[ Packagist](https://packagist.org/packages/ahorn/friendlycaptcha)[ RSS](/packages/ahorn-friendlycaptcha/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (18)Versions (21)Used By (0)

Friendly Captcha V2 integration for Neos Form Framework
=======================================================

[](#friendly-captcha-v2-integration-for-neos-form-framework)

This package add a form element which integrates [Friendly Captcha v2](https://friendlycaptcha.com/) verification to your form.

**Please note: You need an Friendly Captcha account to use these package.**

Prerequisites
-------------

[](#prerequisites)

The Friendly Captcha v2 must be activated. This must be done via the Friendly Captcha website. [![Captch Element](Documentation/Images/activate-friendly-captcha-v2.png)](Documentation/Images/activate-friendly-captcha-v2.png)

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

[](#installation)

The package can be installed via Composer.

```
$ composer require ahorn/friendlycaptcha
```

Update from v1
--------------

[](#update-from-v1)

Change `secretKey` to `apiKey`

Configuration
-------------

[](#configuration)

You need to add your Site Key (`siteKey`) and API Key (`apiKey`) from you Friendly Captcha v2 account. You can specify the default widget language and when the widget should start solving the puzzle. Please have a look at the official [Friendly Captcha Widget API](https://developer.friendlycaptcha.com/docs/v2/) if you need more informations.

```
Ahorn:
  FriendlyCaptcha:
    siteKey: 'add-you-site-key'
    apiKey: 'add-you-api-key'
    language: 'de'
    startVerification: 'auto'
    apiEndpoint: 'global'
    theme: 'auto'
```

### language

[](#language)

(30 October 2024)
[![Captch Element](Documentation/Images/language-support.png)](Documentation/Images/language-support.png)

Current status can be found at

### startVerification

[](#startverification)

- auto: `Default` the solver will start as soon as possible. This is recommended if the user will definitely be submitting the CAPTCHA solution (e.g. there is only one form on the page), this offers the best user experience.
- focus: as soon as the form containing the widget fires the focusin event the solver starts, or when the user presses the start button in the widget. This is recommended for webpages where only few users will actually submit the form. This is the default.
- none: the solver only starts when the user presses the button or it is programatically started by calling start().

### apiEndpoint

[](#apiendpoint)

By default the widget fetches puzzles from , which serves puzzles globally. As a premium service we offer an alternative endpoint that serves requests from datacenters in Germany only.

- `eu`: Service requires a Friendly Captcha Advanced or Enterprise plan. Endpoint hosted in germany
- `global`: `Default`. Global service served from all over the world.

### theme

[](#theme)

- `light`: A light theme (default).
- `dark`: A dark "night mode" theme.
- `auto`: `Default`Match the user's operating system or browser preference settings.

In production environment we strictly recommend to use environment variables to set the values.

Add form element with Neos.Form.Builder
---------------------------------------

[](#add-form-element-with-neosformbuilder)

Create a new form in Neos backend. Add the new Friendly Captcha form element to you form.

[![Captch Element](Documentation/Images/add-frc-fom-element.jpg)](Documentation/Images/add-frc-fom-element.jpg)

Language Support
----------------

[](#language-support)

The package supports language content dimensions and set the language of the widget based on the language dimension. At the moment the package support only 2 characters to identify the language.

Override Settings
-----------------

[](#override-settings)

You can override the following configurations in the node properties:

- Site Key
- Api Key
- Language of the Widget
- Verification start
- Api Endpoint (if you have premium services)
- theme

Error handling
--------------

[](#error-handling)

We added some error codes for better error handling. If you see an error code in the frontend it is most likely to be an configuration error.

- 1732156724: The X-API-Key header or apiKey not set.
- 5786245981: The apiKey is invalid.
- 7956325875: Sitekey is invalid.
- 1380742851: An unknown error has occurred. Check the settings.

---

Neos Fusion Form
----------------

[](#neos-fusion-form)

```
 process {

      content = afx`

    `

      schema {
          captcha = ${Form.Schema.string().validator('Ahorn.FriendlyCaptcha:FriendlyCaptcha')}
      }
  }
```

or use options to set API Key

```
    'apiKey'      => [null, 'Override API key', 'string', false],
    'siteKey'     => [null, 'Override site key', 'string', false],
    'apiEndpoint' => [null, 'Override endpoint: global|eu|us', 'string', false],

```

set in the schema

```
      schema {
          captcha = ${Form.Schema.string().validator('Ahorn.FriendlyCaptcha:FriendlyCaptcha',{
            siteKey: 'override-siteKey',
            apiKey: 'override-apiKey',
            apiEndpoint: 'global'
          })}
      }
```

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance92

Actively maintained with recent releases

Popularity28

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~87 days

Recently: every ~12 days

Total

17

Last Release

38d ago

Major Versions

1.2.x-dev → 2.0.02024-11-07

### Community

Maintainers

![](https://www.gravatar.com/avatar/8cb3ffa71a4ef1b0ef8153abb50bc5f8ef6f29e6cf8672c46b653017f5648b4c?d=identicon)[ahorn](/maintainers/ahorn)

---

Top Contributors

[![Schuppel1](https://avatars.githubusercontent.com/u/28441011?v=4)](https://github.com/Schuppel1 "Schuppel1 (76 commits)")[![mchh](https://avatars.githubusercontent.com/u/523953?v=4)](https://github.com/mchh "mchh (11 commits)")[![koehlerannkathrin](https://avatars.githubusercontent.com/u/40425659?v=4)](https://github.com/koehlerannkathrin "koehlerannkathrin (8 commits)")[![hjanuschka](https://avatars.githubusercontent.com/u/2891702?v=4)](https://github.com/hjanuschka "hjanuschka (1 commits)")[![kdambekalns](https://avatars.githubusercontent.com/u/95873?v=4)](https://github.com/kdambekalns "kdambekalns (1 commits)")

---

Tags

captchaformsfriendly-captchaneoscmsspam-protectionweb-forms

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ahorn-friendlycaptcha/health.svg)

```
[![Health](https://phpackages.com/badges/ahorn-friendlycaptcha/health.svg)](https://phpackages.com/packages/ahorn-friendlycaptcha)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[spatie/crawler

Crawl all internal links found on a website

2.8k18.5M67](/packages/spatie-crawler)[aporat/store-receipt-validator

PHP receipt validator for Apple App Store and Amazon Appstore

6544.0M13](/packages/aporat-store-receipt-validator)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M420](/packages/drupal-core-recommended)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
