PHPackages                             vss/oauth-extension-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. vss/oauth-extension-bundle

ActiveSymfony2-bundle

vss/oauth-extension-bundle
==========================

OAuth Extension for FOSOAuthServerBundle

v1.0.2(9y ago)1226MITPHPPHP &gt;=5.5.9

Since Feb 7Pushed 9y ago1 watchersCompare

[ Source](https://github.com/NathanVss/oauth-extension-bundle)[ Packagist](https://packagist.org/packages/vss/oauth-extension-bundle)[ RSS](/packages/vss-oauth-extension-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (4)Versions (11)Used By (0)

VssOAuthExtensionBundle
=======================

[](#vssoauthextensionbundle)

[![Build Status](https://camo.githubusercontent.com/86cbf0387ef52a57ca489f11ea32f01a582723c975b1679c8e5814bc64b8ac3d/68747470733a2f2f7472617669732d63692e6f72672f4e617468616e5673732f6f617574682d657874656e73696f6e2d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/NathanVss/oauth-extension-bundle)

[![codecov.io](https://camo.githubusercontent.com/f6ea095c80d58314f3081accb6e43917a985ae490183007cb9bd84de297b5f18/68747470733a2f2f636f6465636f762e696f2f6769746875622f4e617468616e5673732f6f617574682d657874656e73696f6e2d62756e646c652f636f7665726167652e7376673f6272616e63683d6d6173746572)](https://codecov.io/github/NathanVss/oauth-extension-bundle?branch=master)

[![Latest Stable Version](https://camo.githubusercontent.com/c0674848d1f36dd944fd3e359371c76087b6def956ee441d300eba7b9035ed3e/68747470733a2f2f706f7365722e707567782e6f72672f7673732f6f617574682d657874656e73696f6e2d62756e646c652f762f737461626c65)](https://packagist.org/packages/vss/oauth-extension-bundle) [![Total Downloads](https://camo.githubusercontent.com/26ce9dc9a198e6bb627c68560e0d89129942e81bdff7ab618095ee538beaccdf/68747470733a2f2f706f7365722e707567782e6f72672f7673732f6f617574682d657874656e73696f6e2d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/vss/oauth-extension-bundle) [![Latest Unstable Version](https://camo.githubusercontent.com/1b5c923602aa29a40b832ca9c551aa5e2bd0bb3638d8db206c0653548e7744b3/68747470733a2f2f706f7365722e707567782e6f72672f7673732f6f617574682d657874656e73696f6e2d62756e646c652f762f756e737461626c65)](https://packagist.org/packages/vss/oauth-extension-bundle) [![License](https://camo.githubusercontent.com/97b87d94aff34541160de1a74a66f9c9c64e05f54acfd5e72c4c03ebbb77172c/68747470733a2f2f706f7365722e707567782e6f72672f7673732f6f617574682d657874656e73696f6e2d62756e646c652f6c6963656e7365)](https://packagist.org/packages/vss/oauth-extension-bundle)

Documentation
-------------

[](#documentation)

### Introduction

[](#introduction)

This bundle extends the features of the `friendsofsymfony/oauth-server-bundle` (  ).

### Grants

[](#grants)

#### Email Grant

[](#email-grant)

This grant allow email based token delivering, the first argument must be a self-made class implementing the interface `Vss\OAuthExtensionBundle\Security\Utils\EmailProvider`. This class is responsible to deliver a user ( `Symfony\Component\Security\Core\User\UserInterface`) or null.

```
  oauth.grant.email:
      class: Vss\OAuthExtensionBundle\Grant\EmailGrant
      arguments:
          - "@app.security.provider.client_email"
          - "@security.encoder_factory"
      tags:
            - { name: fos_oauth_server.grant_extension, uri: 'http://mplatform.com/grants/email' }
```

Here is the `@app.security.provider.client_email`service, `Client` implements `UserInterface`.

```
namespace AppBundle\Security\Client;

use AppBundle\Entity\Client;
use AppBundle\Entity\PlayerRepository;
use Doctrine\ORM\EntityManagerInterface;
use Vss\OAuthExtensionBundle\Security\Utils\EmailProvider;

/**
 * Class ClientEmailProvider
 * @package AppBundle\Security
 */
class ClientEmailProvider implements EmailProvider {

    /**
     * @var \Doctrine\Common\Persistence\ObjectRepository
     */
    private $rep;

    /**
     * ClientEmailProvider constructor.
     * @param EntityManagerInterface $em
     */
    public function __construct(EntityManagerInterface $em) {
        $this->rep = $em->getRepository('AppBundle:Client');
    }

    /**
     * @inheritdoc
     */
    public function loadByEmail($email){
        return $this->rep->findOneBy(['email' => $email]);
    }
}
```

The idea is that you can setup multiple grants for differents user types, we can imagine one EmailProvider returning Admin, an other returning a User, Moderator, etc ... So it is very flexible.

#### Provider Grant

[](#provider-grant)

This grant is supposed to deliver a token from a OAuth Login, like Facebook Login.

```
    oauth.grant.provider:
        class: Vss\OAuthExtensionBundle\Grant\ProviderGrant
        arguments: ["@vss_oauth_extension.oauth_manager", "@app.security.client_manager"]
        tags:
              - { name: fos_oauth_server.grant_extension, uri: 'http://mplatform.com/grants/provider' }
```

The second argument implement the interface `Vss\OAuthExtensionBundle\Security\OAuth\OAuthUserManagerInterface`. Then, this manage should return a user with the provider id or email for example. This grant works with OAuth Authorization Code or OAuth Access Token from the provider. If it is possible I would recommend using the Code instead of Access Token if your website doesn't support HTTPS.

Now, only these providers are available :

- Facebook

Example configuration from `config.yml`.

```
vss_oauth_extension:

    providers:
        facebook:
            type: facebook
            client_id: 1746857792272443
            client_secret: cf395620ca4e0622af55c6d709148f72
```

### TODOS

[](#todos)

Improve doc, more tests.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

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

Recently: every ~68 days

Total

10

Last Release

3372d ago

Major Versions

0.0.7 → v1.0.02016-12-26

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

v1.0.0PHP &gt;=5.5.9

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d566f031e2a54dd49d5eb1e46eac990a13f036f37f4e06fc2eba2a140003549?d=identicon)[NathanVss](/maintainers/NathanVss)

---

Top Contributors

[![NathanVss](https://avatars.githubusercontent.com/u/9628870?v=4)](https://github.com/NathanVss "NathanVss (24 commits)")

### Embed Badge

![Health badge](/badges/vss-oauth-extension-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/vss-oauth-extension-bundle/health.svg)](https://phpackages.com/packages/vss-oauth-extension-bundle)
```

###  Alternatives

[symfonyid/admin-bundle

Provide Admin Generator with KISS Principle

141.6k](/packages/symfonyid-admin-bundle)

PHPackages © 2026

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