PHPackages                             hrevert/ht-league-oauth-client-module - 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. hrevert/ht-league-oauth-client-module

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

hrevert/ht-league-oauth-client-module
=====================================

0.4.0(8y ago)124011PHPPHP &gt;=7.0

Since Aug 21Pushed 8y ago2 watchersCompare

[ Source](https://github.com/hrevert/HtLeagueOauthClientModule)[ Packagist](https://packagist.org/packages/hrevert/ht-league-oauth-client-module)[ RSS](/packages/hrevert-ht-league-oauth-client-module/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)Dependencies (7)Versions (7)Used By (1)

HtLeagueOauthClientModule
=========================

[](#htleagueoauthclientmodule)

[![Build Status](https://camo.githubusercontent.com/40d50f39eeafcb5b0c07e801dc6db22c3a269a4f11e4e22afa0b339302a7f332/68747470733a2f2f7472617669732d63692e6f72672f687265766572742f48744c65616775654f61757468436c69656e744d6f64756c652e737667)](https://travis-ci.org/hrevert/HtLeagueOauthClientModule)[![Latest Stable Version](https://camo.githubusercontent.com/a9bb6c9cfcb89fd4e69fa0eb75f8e9f84677a0cb483d4ac4e61c71eb4f88a74d/68747470733a2f2f706f7365722e707567782e6f72672f687265766572742f68742d6c65616775652d6f617574682d636c69656e742d6d6f64756c652f76657273696f6e2e737667)](https://packagist.org/packages/hrevert/ht-league-oauth-client-module)

A Zend Framework 2 module to integrate [oauth2-client](https://github.com/thephpleague/oauth2-client) and [oauth1-client](https://github.com/thephpleague/oauth1-client) library from the [thephpleague](https://github.com/thephpleague).

Usage
-----

[](#usage)

### For Oauth2

[](#for-oauth2)

```
// in config/module.config.php

use HtLeagueOauthClientModule\Module;

return [
    Module::CONFIG => [
        'oauth2_clients' => [
            'facebook' => [
                'clientId'      =>  'XXXXXXXX',
                'clientSecret'  =>  'XXXXXXXX',
                'redirectUri'   =>  'https://your-registered-redirect-uri/',
            ],
        ],
    ],
];
```

```
$facebookProvider = $serviceLocator->get('HtLeagueOauthClientModule\Oauth2ClientManager')->get('facebook');
```

##### Creating custom oauth2 providers

[](#creating-custom-oauth2-providers)

- Create a class implementing `League\OAuth2\Client\Provider\ProviderInterface`.

```
class MyProvider implements League\OAuth2\Client\Provider\ProviderInterface
{
    // .....
}
```

- Inform Oauth2 client manager about the new provider

```
// in config/module.config.php

use HtLeagueOauthClientModule\Module;

return [
    Module::CONFIG => [
        'oauth2_client_manager' => [
            'factories' => [
                'my_provider' => 'MyProviderFactory',
            ],
        ],
    ],
];
```

- Use the provider

```
$myProvider = $serviceLocator->get('HtLeagueOauthClientModule\Oauth2ClientManager')->get('my_provider');
```

### For Oauth1

[](#for-oauth1)

```
// in config/module.config.php

use HtLeagueOauthClientModule\Module;

return [
    Module::CONFIG => [
        'oauth1_clients' => [
            'twitter' => [
                'identifier' => 'your-identifier',
                'secret' => 'your-secret',
                'callback_uri' => 'http://your-callback-uri/',
            ],
        ],
    ],
];
```

```
$twitterProvider = $serviceLocator->get('HtLeagueOauthClientModule\Oauth1ClientManager')->get('twitter');
```

##### Creating custom oauth2 providers

[](#creating-custom-oauth2-providers-1)

- Create a class extending `League\OAuth1\Client\Server\Server`.

```
class MyProvider extends League\OAuth1\Client\Server\Server
{
    // .....
}
```

- Inform Oauth1 client manager about the new provider

```
// in config/module.config.php

use HtLeagueOauthClientModule\Module;

return [
    Module::CONFIG => [
        'oauth1_client_manager' => [
            'factories' => [
                'my_provider' => 'MyProviderFactory',
            ],
        ],
    ],
];
```

- Use the provider

```
$myProvider = $serviceLocator->get('HtLeagueOauthClientModule\Oauth1ClientManager')->get('my_provider');
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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

Total

5

Last Release

3251d ago

PHP version history (2 changes)0.0.1PHP &gt;=5.4

0.4.0PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/a78ca1505c93127e0ac82e195481baf87cb6f3fae3bd4dcc18b5cfb85ce425ed?d=identicon)[hrevert](/maintainers/hrevert)

---

Top Contributors

[![ojhaujjwal](https://avatars.githubusercontent.com/u/4995501?v=4)](https://github.com/ojhaujjwal "ojhaujjwal (30 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hrevert-ht-league-oauth-client-module/health.svg)

```
[![Health](https://phpackages.com/badges/hrevert-ht-league-oauth-client-module/health.svg)](https://phpackages.com/packages/hrevert-ht-league-oauth-client-module)
```

###  Alternatives

[thenetworg/oauth2-azure

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

2509.6M48](/packages/thenetworg-oauth2-azure)[stevenmaguire/oauth2-keycloak

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

2275.9M27](/packages/stevenmaguire-oauth2-keycloak)[patrickbussmann/oauth2-apple

Sign in with Apple OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1132.5M6](/packages/patrickbussmann-oauth2-apple)[microsoft/kiota-authentication-phpleague

Authentication provider for Kiota using the PHP League OAuth 2.0 client to authenticate against the Microsoft Identity platform

153.2M7](/packages/microsoft-kiota-authentication-phpleague)[dukt/social

Let your visitors log into Craft with web services like Facebook, Google, Twitter…

1141.0k5](/packages/dukt-social)[thathoff/kirby-oauth

Kirby OAuth 2 Plugin

3823.9k](/packages/thathoff-kirby-oauth)

PHPackages © 2026

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