PHPackages                             easyoauth/easyoauth - 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. easyoauth/easyoauth

ActiveLibrary

easyoauth/easyoauth
===================

Easy implementation of OAuth2

00PHP

Since Mar 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/samir755/easyoauth)[ Packagist](https://packagist.org/packages/easyoauth/easyoauth)[ RSS](/packages/easyoauth-easyoauth/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

EasyOauth
=========

[](#easyoauth)

EasyOauth is a good starter pack for implement API with Oauth2 in your project. EasyOauth manage token needed for your api.

*Build on Symfony 5*

Installation
============

[](#installation)

Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

Applications that use Symfony Flex
----------------------------------

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
$ composer require easyoauth
```

Applications that don't use Symfony Flex
----------------------------------------

[](#applications-that-dont-use-symfony-flex)

### Step 1: Define your client in `config/packages/framework.yaml`

[](#step-1-define-your-client-in-configpackagesframeworkyaml)

Here is an example for a famous French job api:

```
    http_client:
        ...
        scoped_clients:
            oauth.client:
                scope: 'https://\entreprise\.pole-emploi.fr'
                headers:
                    Content-Type: application/x-www-form-urlencoded
                    Accept: application/json
```

### Step 2: Fill your environment values (.env)

[](#step-2-fill-your-environment-values-env)

```
###> EasyOauth/EasyOauth ###
CLIENT_ID=
CLIENT_SECRET=
CLIENT_URI=      //Sample: https://entreprise.pole-emploi.fr/connexion/oauth2/access_token?realm=%2Fpartenaire
CLIENT_SCOPE=""
###< EasyOauth/EasyOauth ###
```

### Step 3: Update your database

[](#step-3-update-your-database)

```
Symfony console d:s:u --force
```

### Step 4: Register the bundle

[](#step-4-register-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
EasyOauth\src\EasyOauthBundle::class => ['all' => true]

```

### Step 5: Connect to your API

[](#step-5-connect-to-your-api)

Retreive **oauthConnect()** service with dependency injection into your controller

```
    use EasyOauth\src\Provider\OauthProvider;

    //...

    //Generate Token
    $this->oauthProvider->oauthConnect(true); //If scope is defined
    $token = $this->oauthProvider->getToken();

    //Start your call
```

Enjoy :)

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![samir755](https://avatars.githubusercontent.com/u/14289777?v=4)](https://github.com/samir755 "samir755 (5 commits)")

### Embed Badge

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

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

PHPackages © 2026

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