PHPackages                             wilkques/pkce-php - 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. [Security](/categories/security)
4. /
5. wilkques/pkce-php

ActiveLibrary[Security](/categories/security)

wilkques/pkce-php
=================

PKCE for PHP

v3.0.0(1y ago)1214MITPHPPHP ^8.2

Since May 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/wilkques/pkce-php)[ Packagist](https://packagist.org/packages/wilkques/pkce-php)[ RSS](/packages/wilkques-pkce-php/feed)WikiDiscussions master Synced 1w ago

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

PKCE for PHP
============

[](#pkce-for-php)

[![Latest Stable Version](https://camo.githubusercontent.com/fbbb4a76777f64cd708f1fe56be517029e58a5e8a3d67cea20dd1525effa24d3/68747470733a2f2f706f7365722e707567782e6f72672f77696c6b717565732f706b63652d7068702f762f737461626c65)](https://packagist.org/packages/wilkques/pkce-php)[![License](https://camo.githubusercontent.com/eee16cb7c7fb52b750f3ae8136a695f15f301909f5a8edf1439b1073d3407b5a/68747470733a2f2f706f7365722e707567782e6f72672f77696c6b717565732f706b63652d7068702f6c6963656e7365)](https://packagist.org/packages/wilkques/pkce-php)

```
composer require wilkques/pkce-php

```

How to use
----------

[](#how-to-use)

```
use Wilkques\PKCE\Generator;

$codeVerifier = Generator::codeVerifier();

$codeChallenge = Generator::codeChallenge($codeVerifier);

// or

$pkce = Generator::generate();

$codeVerifier = $pkce->getCodeVerifier();

$codeChallenge = $pkce->getCodeChallenge();

// or

$codeVerifier = $pkce->codeVerifier;

$codeChallenge = $pkce->codeChallenge;

// or

$pkce->toArray(); // output ['codeVerifier' => '123', 'codeChallenge' => '456']

$pkce->toJson(); // output {'codeVerifier' : '123', 'codeChallenge' : '456'}
```

REFERENCE
---------

[](#reference)

1. [PKCE実装で使うcode\_verifierとcode\_challengeをPHPで実装する。](https://qiita.com/sugamaan/items/50699432a65ad9e5829e)
2. [PKCE support for LINE Login](https://developers.line.biz/en/docs/line-login/integrate-pkce/)
3. [OAuth2.0拡張仕様のPKCE実装紹介 〜 Yahoo! ID連携に導入しました](https://techblog.yahoo.co.jp/entry/20191219790463)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance46

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

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 ~523 days

Total

3

Last Release

420d ago

Major Versions

v1.0.0 → v2.0.02022-05-18

v2.0.0 → v3.0.02025-03-25

PHP version history (2 changes)v1.0.0PHP ^7.0|^8.0

v3.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/906e907ec7e3dbe49f32aebd0f36488176d3736a65d38675753ba9a6a21017b6?d=identicon)[wilkques](/maintainers/wilkques)

---

Top Contributors

[![wilkques](https://avatars.githubusercontent.com/u/51186879?v=4)](https://github.com/wilkques "wilkques (8 commits)")

### Embed Badge

![Health badge](/badges/wilkques-pkce-php/health.svg)

```
[![Health](https://phpackages.com/badges/wilkques-pkce-php/health.svg)](https://phpackages.com/packages/wilkques-pkce-php)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41478.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

87117.5M63](/packages/bjeavons-zxcvbn-php)[illuminate/encryption

The Illuminate Encryption package.

9229.7M280](/packages/illuminate-encryption)[paragonie/hidden-string

Encapsulate strings in an object to hide them from stack traces

7410.6M39](/packages/paragonie-hidden-string)

PHPackages © 2026

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