PHPackages                             authentiq/oauth2-authentiq - 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. authentiq/oauth2-authentiq

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

authentiq/oauth2-authentiq
==========================

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

v1.0.0(9y ago)123MITPHPPHP &gt;=5.4.0

Since Apr 6Pushed 8y ago4 watchersCompare

[ Source](https://github.com/AuthentiqID/oauth2-authentiq-php)[ Packagist](https://packagist.org/packages/authentiq/oauth2-authentiq)[ RSS](/packages/authentiq-oauth2-authentiq/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Authentiq Provider for OAuth 2.0 Client
=======================================

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

This package provides [Authentiq](https://www.authentiq.com/developers/?utm_source=github&utm_medium=readme&utm_campaign=oauth2-authentiq-php) support for the PHP League's [OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client).

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

[](#installation)

To install, use composer:

```
composer require authentiq/oauth2-authentiq

```

Usage
-----

[](#usage)

Usage is the same as The League's OAuth client, using `Authentiq\OAuth2\Client\Provider\Authentiq` as the provider.

### Authorization Code Flow

[](#authorization-code-flow)

```
$provider = new Authentiq\OAuth2\Client\Provider\Authentiq([
    'clientId'     => 'authentiq-client-id',
    'clientSecret' => 'authentiq-client-secret',
    'redirectUri'  => 'your-callback-url',
    'scope'        => 'openid email~rs phone~r aq:name aq:push'
]);

// If we don't have an authorization code then get one
if (!isset($_GET['code'])) {

    // Fetch the authorization URL from the provider; this returns the
    // urlAuthorize option and generates and applies any necessary parameters
    // (e.g. state).
    $authorizationUrl = $provider->getAuthorizationUrl();

    // Get the state generated for you and store it to the session.
    $_SESSION['oauth2state'] = $provider->getState();

    // Redirect the user to the authorization URL.
    header('Location: ' . $authorizationUrl);
    exit;

// Check given state against previously stored one to mitigate CSRF attack
} elseif (empty($_GET['state']) || (isset($_SESSION['oauth2state']) && $_GET['state'] !== $_SESSION['oauth2state'])) {

    if (isset($_SESSION['oauth2state'])) {
        unset($_SESSION['oauth2state']);
    }
    exit('Invalid state');

} else {
    try {
        // Try to get an the IdToken using the authorization code grant.
        $idToken = $provider->getAccessToken('authorization_code', [
            'code' => $_GET['code']
        ]);

        // Using the ID token, create the resource owner.
        $resourceOwner = $provider->getResourceOwner($idToken);

        // Now the $resourceOwner contains all the user info you need to create the user,
        // store the unique user id from the sub
        // or present the info you asked for.

    } catch (\League\OAuth2\Client\Provider\Exception\IdentityProviderException $e) {

        // Failed to get the access token or user details.
        exit($e->getMessage());

    }
}
```

Refreshing a Token
------------------

[](#refreshing-a-token)

Authentiq's OAuth implementation does not use refresh tokens.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.2% 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

Unknown

Total

1

Last Release

3326d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6b4c09a1c2643d0f127e8a39d0e823709629a389b6c83d9d6192102af66b2f16?d=identicon)[authentiq](/maintainers/authentiq)

---

Top Contributors

[![alexkeramidas](https://avatars.githubusercontent.com/u/4745693?v=4)](https://github.com/alexkeramidas "alexkeramidas (15 commits)")[![skion](https://avatars.githubusercontent.com/u/532192?v=4)](https://github.com/skion "skion (1 commits)")[![stannie](https://avatars.githubusercontent.com/u/676342?v=4)](https://github.com/stannie "stannie (1 commits)")

---

Tags

clientoauthoauth2authorizationauthentiq

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/authentiq-oauth2-authentiq/health.svg)

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

###  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)

PHPackages © 2026

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