PHPackages                             teltek/pumukit-oauth2-bundle - 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. teltek/pumukit-oauth2-bundle

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

teltek/pumukit-oauth2-bundle
============================

OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1.0.0(5y ago)0227proprietaryPHPPHP &gt;=7.2

Since Apr 12Pushed 4y ago3 watchersCompare

[ Source](https://github.com/pumukit/PumukitOauth2Bundle)[ Packagist](https://packagist.org/packages/teltek/pumukit-oauth2-bundle)[ Docs](https://github.com/pumukit/PumukitOAuth2Bundle)[ RSS](/packages/teltek-pumukit-oauth2-bundle/feed)WikiDiscussions master Synced 1mo ago

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

OAuth 2.0 Client
================

[](#oauth-20-client)

This package provides OAuth 2.0 support for the PHP League's [OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client).

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

[](#installation)

To install, use composer:

```
composer require teltek/pumukit-oauth2-bundle

```

if not, add this to config/bundles.php

```
Pumukit\OAuth2Bundle\PumukitOAuth2Bundle::class => ['all' => true]

```

Then execute the following commands

```
php bin/console cache:clear
php bin/console cache:clear --env=prod
php bin/console assets:install
```

Usage
-----

[](#usage)

Usage is the same as The League's OAuth client, using `Pumukit\OAuth2Bundle\Provider\Oam` as the provider.

### Authorization Code Flow

[](#authorization-code-flow)

```
$provider = new Pumukit\OAuth2Bundle\Provider\Oam(
    'clientId' => 'your client id',
    'clientSecret' => 'your client secret',
    'redirectUri' => 'your redirect uri',
    'urlAuthorize' => 'your url authorize',
    'urlAccessToken' => 'your url access token',
    'urlResourceOwnerDetails' => 'your url resource owner details',
]);

if (!isset($_GET['code'])) {
    $options['scope'] = array('Customer.Info','UserProfile.me');
    $authorizationUrl = $provider->getAuthorizationUrl($options);

    $_SESSION['oauth2state'] = $provider->getState();

    header('Location: '.$authorizationUrl);
    exit;

} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) {
    unset($_SESSION['oauth2state']);
    exit('Invalid state');
} else {

    try {
        $accessToken = $provider->getAccessToken('authorization_code',['code' => $_GET['code']]);

        $resourceOwner = $provider->getResourceOwner($accessToken);

        ...
    }  catch (IdentityProviderException $e) {
        exit($e->getMessage());
    }
```

### Scopes

[](#scopes)

If you want send different scopes you must edit:

```
$options['scope'] = array('Customer.Info','UserProfile.me');
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

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

Total

2

Last Release

1853d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11873240?v=4)[Pablo Ogando Ferreira](/maintainers/Yurujai)[@Yurujai](https://github.com/Yurujai)

---

Top Contributors

[![Yurujai](https://avatars.githubusercontent.com/u/11873240?v=4)](https://github.com/Yurujai "Yurujai (10 commits)")

---

Tags

clientsymfonyoauth2teltek

### Embed Badge

![Health badge](/badges/teltek-pumukit-oauth2-bundle/health.svg)

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

###  Alternatives

[league/oauth2-google

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

41721.2M118](/packages/league-oauth2-google)[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)[league/oauth2-instagram

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

761.0M31](/packages/league-oauth2-instagram)[mollie/oauth2-mollie-php

Mollie Provider for OAuth 2.0 Client

251.7M1](/packages/mollie-oauth2-mollie-php)

PHPackages © 2026

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