PHPackages                             synolia/sylius-admin-oauth-plugin - 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. synolia/sylius-admin-oauth-plugin

ActiveSylius-plugin[Authentication &amp; Authorization](/categories/authentication)

synolia/sylius-admin-oauth-plugin
=================================

Oauth plugin for Sylius admin.

v2.0.0(11mo ago)28.9k↓27.8%2EUPL-1.2PHPPHP ^8.2CI passing

Since Jan 5Pushed 11mo ago11 watchersCompare

[ Source](https://github.com/synolia/SyliusAdminOAuthPlugin)[ Packagist](https://packagist.org/packages/synolia/sylius-admin-oauth-plugin)[ RSS](/packages/synolia-sylius-admin-oauth-plugin/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (26)Versions (10)Used By (0)

[![License](https://camo.githubusercontent.com/602c0a7c535a03e4ce3251fe7387167ba7cfa51cf807b6f91b358d418004c793/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73796e6f6c69612f73796c6975732d61646d696e2d6f617574682d706c7567696e2e737667)](https://github.com/synolia/SyliusAdminOauthPlugin/blob/main/LICENSE)[![CI - Analysis](https://github.com/synolia/SyliusAdminOAuthPlugin/actions/workflows/analysis.yaml/badge.svg?branch=main)](https://github.com/synolia/SyliusAdminOAuthPlugin/actions/workflows/analysis.yaml)[![CI - Sylius](https://github.com/synolia/SyliusAdminOAuthPlugin/actions/workflows/sylius.yaml/badge.svg?branch=main)](https://github.com/synolia/SyliusAdminOAuthPlugin/actions/workflows/sylius.yaml)[![Version](https://camo.githubusercontent.com/c828e1dafc6b487a9cdfb034f32b615679ae7bcaefcbb2f6e4c4f65ba86d1f2a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73796e6f6c69612f73796c6975732d61646d696e2d6f617574682d706c7567696e2e737667)](https://packagist.org/packages/synolia/sylius-admin-oauth-plugin)[![Total Downloads](https://camo.githubusercontent.com/b54bd7ed4e540ee67f4bd420ed360307e38f994573c0c7de30302ddff6b498fe/68747470733a2f2f706f7365722e707567782e6f72672f73796e6f6c69612f73796c6975732d61646d696e2d6f617574682d706c7567696e2f646f776e6c6f616473)](https://packagist.org/packages/synolia/sylius-admin-oauth-plugin)

 [ ![](docs/sylius_logo.png) ](https://sylius.com)

Synolia SyliusAdminOauthPlugin
==============================

[](#synolia-syliusadminoauthplugin)

Add OAuth authentication for Sylius admin panel

Features
--------

[](#features)

- Allow your admin users to subscribe and sign in with OAuth providers :
    - Google
    - Microsoft
- Allow domain connexion management.

Requirements
------------

[](#requirements)

VersionPHP^8.2Sylius^1.12 or ^2.0Installation
------------

[](#installation)

1. Add the bundle and dependencies in your composer.json :

    ```
    $ composer require synolia/sylius-admin-oauth-plugin
    ```
2. Write your Google and/or Microsoft client ID and client secret in you .env file with those keys :

    ```
    SYNOLIA_ADMIN_OAUTH_GOOGLE_CLIENT_ID=
    SYNOLIA_ADMIN_OAUTH_GOOGLE_CLIENT_SECRET=

    SYNOLIA_ADMIN_OAUTH_MICROSOFT_CLIENT_ID=
    SYNOLIA_ADMIN_OAUTH_MICROSOFT_CLIENT_SECRET=
    ```
3. In your security.yaml, add the OAuth authenticator in your admin firewall and put access\_control paths you need depending on wich provider you use. **They must be on top of the others** :

    ```
    security:
      firewalls:
        admin:
            custom_authenticators:
                - Synolia\SyliusAdminOauthPlugin\Security\Authenticator\OauthAuthenticator

      access_control:
        - { path: "%sylius.security.admin_regex%/connect/google", role: PUBLIC_ACCESS, requires_channel: https }
        - { path: "%sylius.security.admin_regex%/connect/google/check", role: PUBLIC_ACCESS, requires_channel: https }

        - { path: "%sylius.security.admin_regex%/connect/microsoft", role: PUBLIC_ACCESS, requires_channel: https }
        - { path: "%sylius.security.admin_regex%/connect/microsoft/check", role: PUBLIC_ACCESS, requires_channel: https }
    ```
4. Create a config/routes/synolia\_oauth.yaml to configure plugin's routes and to prefix them with 'admin':

    ```
     synolia_oauth:
         resource: '@SynoliaSyliusAdminOauthPlugin/config/routes[-legacy].yaml'
         prefix: '/%sylius_admin.path_name%'
    ```
5. Create a config/packages/synolia\_oauth\_config.yaml to import all required configs depending on which sylius version you use:

    ```
    imports:
      - { resource: "@SynoliaSyliusAdminOauthPlugin/config/app[-legacy].yaml" }
    ```
6. Add this trait to your App\\Entity\\User\\AdminUser.php

    ```
    use Doctrine\ORM\Mapping as ORM;
    use Sylius\Component\Core\Model\AdminUser as BaseAdminUser;
    use Synolia\SyliusAdminOauthPlugin\Entity\User\CustomAdminUserTrait;

    class AdminUser extends BaseAdminUser
    {
         use CustomAdminUserTrait;
    }
    ```
7. Apply migrations to your database:

    ```
     php bin/console doctrine:migrations:migrate
    ```
8. After the first installation, no domain is configured so you have to add one to be able to connect with OAuth. If you already have admin users, add one through the administration panel and authorize it. You can access it through OAuth domain administration section in the menu.

Don't forget to add your Allowed redirect URIs in Google cloud console or Azure Active Directory ! Full documentation here :

- Google:
- Microsoft:

You can now connect to your accounts with OAuth in the admin login panel !

Troubleshooting
---------------

[](#troubleshooting)

- Error 'TOO\_MANY\_REDIRECT' : add these two lines
    - services.yaml: ```
        parameters:
          router.request_context.scheme: 'https'
        ```
    - framework.yaml:

    ```
    framework:
      trusted_proxies: '127.0.0.1,REMOTE_ADDR'
    ```
- If you don't see your oauth connexion button, verify your .env variables where your client\_id and client\_secret are specified
- If you have "Impossible to connect, try again" message, **don't forget to configure your authorized domains in back-office.**

Development
-----------

[](#development)

See [How to contribute](CONTRIBUTING.md).

License
-------

[](#license)

This library is under the [EUPL-1.2 license](LICENSE).

Credits
-------

[](#credits)

Developed by [Synolia](https://synolia.com/).

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance51

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 63.4% 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 ~102 days

Recently: every ~122 days

Total

6

Last Release

350d ago

Major Versions

v1.1.0 → v2.0.02025-06-02

PHP version history (2 changes)v1.0.0PHP ^8.1

v1.1.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/32f47fee63643780d0758c7803bd7f2e682fb8c41e09a6f6041412b3264821c1?d=identicon)[synolia](/maintainers/synolia)

---

Top Contributors

[![oallain](https://avatars.githubusercontent.com/u/6593252?v=4)](https://github.com/oallain "oallain (26 commits)")[![maxperei](https://avatars.githubusercontent.com/u/7437661?v=4)](https://github.com/maxperei "maxperei (7 commits)")[![timmess](https://avatars.githubusercontent.com/u/44289224?v=4)](https://github.com/timmess "timmess (7 commits)")[![thomas-vermot-synolia](https://avatars.githubusercontent.com/u/66958450?v=4)](https://github.com/thomas-vermot-synolia "thomas-vermot-synolia (1 commits)")

---

Tags

oauthoauth2phpsyliussylius-pluginsyliussylius-plugin

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/synolia-sylius-admin-oauth-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/synolia-sylius-admin-oauth-plugin/health.svg)](https://phpackages.com/packages/synolia-sylius-admin-oauth-plugin)
```

###  Alternatives

[synolia/sylius-scheduler-command-plugin

Scheduler Command Plugin.

34361.5k](/packages/synolia-sylius-scheduler-command-plugin)[synolia/sylius-akeneo-plugin

Akeneo connector for Sylius.

2696.0k](/packages/synolia-sylius-akeneo-plugin)[webgriffe/sylius-akeneo-plugin

Plugin allowing to import products data from Akeneo PIM to your Sylius store.

2477.8k](/packages/webgriffe-sylius-akeneo-plugin)[synolia/sylius-mail-tester-plugin

Mail Tester Plugin.

14142.2k1](/packages/synolia-sylius-mail-tester-plugin)[webgriffe/sylius-table-rate-shipping-plugin

Provides table rate shipping calculator.

1490.4k](/packages/webgriffe-sylius-table-rate-shipping-plugin)

PHPackages © 2026

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