Download the PHP package crevillo/ezsocialloginbundle without Composer
On this page you can find all versions of the php package crevillo/ezsocialloginbundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download crevillo/ezsocialloginbundle
More information about crevillo/ezsocialloginbundle
Files in crevillo/ezsocialloginbundle
Package ezsocialloginbundle
Short Description Social login for eZ Platform
License GPL-2.0
Informations about the package ezsocialloginbundle
Ez Social Login Bundle
The eZ Social Login Bundle adds support for authenticating users via OAuth1.0a or OAuth2 in eZ Platform.
It just uses HwiOauthBundle, so you can refer to this documentation bundle to know how it internally works.
Installation
You can install this project via composer:
Documentation
You can use any of the social networks listed in HwiOauthBundle documentation. Please refer to that bundle in order to know how you can configure any of them.
Setting up this bundle
A) Add EzSocialLoginBundle to your project
B) Enable the bundle
Enable the bundle in the kernel, you will also need to enable HwiOauthBundle
C) Import the routing
Import the redirect.xml
and login.xml
routing files in your own routing file.
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 anywhere in your content block of your template.
D) Configure Google resource owner
You will need to modify your config.yml file adding
Next, you can add your google app information and options under hwi_oauth > resource_owners settings
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: . This bundle provides this service 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
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:
Finally the paths you have defined in the previous step for your resource_owners must be adding to your routing.
- 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!.