PHPackages                             mathsgod/jwt-recaptcha - 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. mathsgod/jwt-recaptcha

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

mathsgod/jwt-recaptcha
======================

using json web token for recaptcha, without session, without database

2.0.1(1y ago)17[1 PRs](https://github.com/mathsgod/jwt-recaptcha/pulls)MITPHPPHP &gt;=8.0.0CI passing

Since Apr 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mathsgod/jwt-recaptcha)[ Packagist](https://packagist.org/packages/mathsgod/jwt-recaptcha)[ RSS](/packages/mathsgod-jwt-recaptcha/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (4)Dependencies (2)Versions (6)Used By (0)

jwt-recaptcha
=============

[](#jwt-recaptcha)

using jwt for recaptcha in php

Server generate hash
--------------------

[](#server-generate-hash)

```
$secret="your secret key";

$re = new ReCaptcha($secret);
$hash = $re->hash();

echo $hash["token"]; //token sent to user, use for verify later
echo $hash["image"]; //recaptcha image
```

Server verify recaptcha code
----------------------------

[](#server-verify-recaptcha-code)

```
$re = new ReCaptcha($secret);
$code;//get from user
$token;//get from user sent before

if($re->verify($code,$token)){
    //correct code
}else{
    //incorrect code
}
```

### Demo

[](#demo)

```
$re = new ReCaptcha($secret,  [
    "charset" => "1234567890",
    "code_length" => 4,
    "num_lines" => 1,
    "perturbation" => 0.5
]);

$hash = $re->hash();
$image_src = $hash["image"];
```

[![](https://raw.githubusercontent.com/mathsgod/jwt-recaptcha/refs/heads/master/demo/demo.png)](https://raw.githubusercontent.com/mathsgod/jwt-recaptcha/refs/heads/master/demo/demo.png)

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance40

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~587 days

Total

4

Last Release

513d ago

Major Versions

1.0.1 → 2.0.02024-11-28

PHP version history (2 changes)1.0.0PHP &gt;=7.0

2.0.0PHP &gt;=8.0.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18732337?v=4)[Raymond](/maintainers/mathsgod)[@mathsgod](https://github.com/mathsgod)

---

Top Contributors

[![mathsgod](https://avatars.githubusercontent.com/u/18732337?v=4)](https://github.com/mathsgod "mathsgod (18 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mathsgod-jwt-recaptcha/health.svg)

```
[![Health](https://phpackages.com/badges/mathsgod-jwt-recaptcha/health.svg)](https://phpackages.com/packages/mathsgod-jwt-recaptcha)
```

###  Alternatives

[google/auth

Google Auth Library for PHP

1.4k294.2M216](/packages/google-auth)[thenetworg/oauth2-azure

Azure Active Directory OAuth 2.0 Client Provider for The PHP League OAuth2-Client

25310.7M81](/packages/thenetworg-oauth2-azure)[stevenmaguire/oauth2-keycloak

Keycloak OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2306.4M44](/packages/stevenmaguire-oauth2-keycloak)[robsontenorio/laravel-keycloak-guard

🔑 Simple Keycloak Guard for Laravel

5181.2M3](/packages/robsontenorio-laravel-keycloak-guard)[ellaisys/aws-cognito

Laravel Authentication using AWS Cognito (Web and API)

123256.9k1](/packages/ellaisys-aws-cognito)[rainlab/user-plugin

User plugin for October CMS

11955.0k15](/packages/rainlab-user-plugin)

PHPackages © 2026

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