PHPackages                             crevillo/ezsocialloginbundle - 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. crevillo/ezsocialloginbundle

ActiveEzplatform-bundle[Authentication &amp; Authorization](/categories/authentication)

crevillo/ezsocialloginbundle
============================

Social login for eZ Platform

v2.0.0(6y ago)31426[1 issues](https://github.com/crevillo/ezsocialloginbundle/issues)GPL-2.0PHPCI failing

Since Mar 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/crevillo/ezsocialloginbundle)[ Packagist](https://packagist.org/packages/crevillo/ezsocialloginbundle)[ RSS](/packages/crevillo-ezsocialloginbundle/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (23)Used By (0)

Ez Social Login Bundle
======================

[](#ez-social-login-bundle)

[![Build Status](https://camo.githubusercontent.com/c580ab2b07df1ca4a15a0fcad2806960a2667eebe601ae32985b57f37b0aa80c/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f63726576696c6c6f2f657a736f6369616c6c6f67696e62756e646c652e7376673f6272616e63683d6d6173746572)](http://travis-ci.org/crevillo/ezsocialloginbundle)[![Latest Stable Version](https://camo.githubusercontent.com/fe344b289d8a516e91c7d62831b2d967be0432c7e5ba75035050fd86c69c9eac/68747470733a2f2f706f7365722e707567782e6f72672f63726576696c6c6f2f657a736f6369616c6c6f67696e62756e646c652f762f737461626c652e737667)](https://packagist.org/packages/crevillo/ezsocialloginbundle)

The eZ Social Login Bundle adds support for authenticating users via OAuth1.0a or OAuth2 in eZ Platform.

It just uses [HwiOauthBundle](https://github.com/hwi/HWIOAuthBundle), so you can refer to this documentation bundle to know how it internally works.

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

[](#installation)

You can install this project via composer:

```
composer require crevillo/ezsocialloginbundle

```

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

[](#documentation)

You can use any of the social networks listed in [HwiOauthBundle documentation](https://github.com/hwi/HWIOAuthBundle#installation). Please refer to that bundle in order to know how you can configure any of them.

Setting up this bundle
----------------------

[](#setting-up-this-bundle)

### A) Add EzSocialLoginBundle to your project

[](#a-add-ezsocialloginbundle-to-your-project)

```
composer require crevillo/ezsocialloginbundle:dev-master
```

### B) Enable the bundle

[](#b-enable-the-bundle)

Enable the bundle in the kernel, you will also need to enable HwiOauthBundle

```
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new HWI\Bundle\OAuthBundle\HWIOAuthBundle(),
        new Crevillo\EzSocialLoginBundle\CrevilloEzSocialLoginBundle()
    );
}
```

### C) Import the routing

[](#c-import-the-routing)

Import the `redirect.xml` and `login.xml` routing files in your own routing file.

```
# app/config/routing.yml
hwi_oauth_redirect:
    resource: "@HWIOAuthBundle/Resources/config/routing/redirect.xml"
    prefix:   /connect

hwi_oauth_login:
    resource: "@HWIOAuthBundle/Resources/config/routing/login.xml"
    prefix:   /login
```

**Note:**

> The bundle will override default user login template provided by EzPublishCoreBundle. It might happen that you won't see any changes if any of your others bundles does that too. So, if you already have a customized login template, just add [these lines](https://github.com/crevillo/ezsocialloginbundle/blob/master/Resources/views/Security/login.html.twig#L36-L38) anywhere in your content block of your template.

### D) Configure Google resource owner

[](#d-configure-google-resource-owner)

You will need to modify your config.yml file adding

```
hwi_oauth:
    # list of names of the firewalls in which this bundle is active, this setting MUST be set
    firewall_names: [ezpublish_front]
```

Next, you can add your google app information and options under hwi\_oauth &gt; resource\_owners settings

```
hwi_oauth:
    # list of names of the firewalls in which this bundle is active, this setting MUST be set
    firewall_names: [ezpublish_front]
    resource_owners:
        your_google_app:
            type: google
            client_id:
            client_secret:
            scope: "email profile"
```

### E) Configuring the Security Layer

[](#e-configuring-the-security-layer)

The bundle needs a service that is able to load users based on the user response of the oauth endpoint. It should implement the interface: `HWI\Bundle\OAuthBundle\Security\Core\User\OAuthAwareUserProviderInterface`. This bundle provides [this service](https://github.com/crevillo/ezsocialloginbundle/blob/master/Security/EzSocialUserProvider.php) as an starting point, but you are free to create your own.

Our UserProvider will try to get the username from the social network. If there as already any user in the eZ Platform repository with this username, it will just return it.

If there is no user having that username, it will try to create a new one under your "Guest Accounts" user group and will also log in it.

### F) Configure the oauth firewall

[](#f-configure-the-oauth-firewall)

In the firewall configuration you will need to configure a login path for the resource owners you have configured previously. Additionally you will need to point the oauth firewall to the service this bundle provides:

```
# app/config/security.yml
security:
    firewalls:
        # your other firewalls
        #
        ezpublish_front:
            anonymous: ~
            oauth:
                resource_owners:
                    google:             "/login/check-google"
                login_path:        /login
                use_forward:       false
                failure_path:      /login

                oauth_user_provider:
                    service:  crevillo.ezsocialloginbundle.oauth_aware.user_provider.service
```

Finally the paths you have defined in the previous step for your resource\_owners must be adding to your routing.

```
# app/config/routing.yml
google_login:
    path: /login/check-google
```

- Actually this is manually tested and seems to work for Facebook, Twitter, Google and Linkedin.

That's it!. Feel free to try any other social networks!.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 94.9% 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 ~108 days

Recently: every ~0 days

Total

14

Last Release

2350d ago

Major Versions

v0.9.2 → v1.0.02020-01-21

v1.0.3 → v2.0.02020-01-22

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/306215?v=4)[Carlos Revillo](/maintainers/crevillo)[@crevillo](https://github.com/crevillo)

---

Top Contributors

[![crevillo](https://avatars.githubusercontent.com/u/306215?v=4)](https://github.com/crevillo "crevillo (37 commits)")[![andrerom](https://avatars.githubusercontent.com/u/289757?v=4)](https://github.com/andrerom "andrerom (1 commits)")[![DeClemo](https://avatars.githubusercontent.com/u/3499026?v=4)](https://github.com/DeClemo "DeClemo (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[oro/platform

Business Application Platform (BAP)

642140.7k104](/packages/oro-platform)

PHPackages © 2026

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