PHPackages                             contactduty/oauth-contact-duty - 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. contactduty/oauth-contact-duty

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

contactduty/oauth-contact-duty
==============================

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

0.0.5(7y ago)0221MITPHPPHP &gt;=5.6.0

Since Mar 26Pushed 7y ago1 watchersCompare

[ Source](https://github.com/contactduty/oauth-contact-duty)[ Packagist](https://packagist.org/packages/contactduty/oauth-contact-duty)[ Docs](https://contactduty.com/)[ RSS](/packages/contactduty-oauth-contact-duty/feed)WikiDiscussions master Synced 2w ago

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

ContactDuty Provider for OAuth 2.0 Client
=========================================

[](#contactduty-provider-for-oauth-20-client)

[ContactDuty](https://contactduty.com/) OAuth 2.0 support for the PHP League’s [OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client).

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

[](#installation)

```
$ composer require contactduty/oauth-contact-duty

```

Usage
-----

[](#usage)

You can get your OAuth client credentials [here](https://contactduty.com/home/api-clients).

```
try {
    $provider = new ContactDuty\OAuth2\Client([
        'clientId'          => $clientId,
        'clientSecret'      => $clientSecret,
        'redirectUri'       => $redirectUri
    ]);

    $accessToken = $provider->getAccessToken('client_credentials');

    echo 'Access Token: ' . $accessToken->getToken() . "";
    echo 'Expired in: ' . $accessToken->getExpires() . "";
    echo 'Already expired? -> ' . ($accessToken->hasExpired() ? 'expired' : 'not expired') . "";

 } catch (League\OAuth2\Client\Provider\Exception\IdentityProviderException $e) {
    // Failed to get the access token
    die($e->getMessage());
}
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

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

Total

5

Last Release

2792d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/44795976?v=4)[Contact Duty](/maintainers/contactduty)[@contactduty](https://github.com/contactduty)

---

Top Contributors

[![floringavrila](https://avatars.githubusercontent.com/u/3042674?v=4)](https://github.com/floringavrila "floringavrila (11 commits)")

### Embed Badge

![Health badge](/badges/contactduty-oauth-contact-duty/health.svg)

```
[![Health](https://phpackages.com/badges/contactduty-oauth-contact-duty/health.svg)](https://phpackages.com/packages/contactduty-oauth-contact-duty)
```

###  Alternatives

[league/oauth2-google

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

42222.6M157](/packages/league-oauth2-google)[stevenmaguire/oauth2-keycloak

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

2276.2M36](/packages/stevenmaguire-oauth2-keycloak)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[thenetworg/oauth2-azure

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

24610.3M72](/packages/thenetworg-oauth2-azure)[patrickbussmann/oauth2-apple

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

1152.7M11](/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.8M9](/packages/microsoft-kiota-authentication-phpleague)

PHPackages © 2026

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