socalnick / scn-social-auth
Uses the HybridAuth PHP library to Enable authentication via Google, Facebook, Twitter, Yahoo!, etc for the ZfcUser ZF2 module.
Installs: 73 950
Dependents: 5
Suggesters: 0
Security: 1
Stars: 216
Watchers: 38
Forks: 110
Open Issues: 1
Requires
- php: >=5.3.3
- hybridauth/hybridauth: 2.13.*
- zendframework/zend-authentication: 2.*
- zendframework/zend-db: 2.*
- zendframework/zend-eventmanager: 2.*
- zendframework/zend-http: 2.*
- zendframework/zend-i18n: 2.*
- zendframework/zend-loader: 2.*
- zendframework/zend-log: 2.*
- zendframework/zend-modulemanager: 2.*
- zendframework/zend-mvc: 2.*
- zendframework/zend-serializer: 2.*
- zendframework/zend-servicemanager: 2.*
- zendframework/zend-session: 2.*
- zendframework/zend-stdlib: 2.*
- zendframework/zend-test: 2.*
- zendframework/zend-uri: 2.*
- zendframework/zend-view: 2.*
- zf-commons/zfc-base: 0.1.*
- zf-commons/zfc-user: 1.4.*
Requires (Dev)
- mockery/mockery: 0.8.0
- dev-master
- 1.22.1
- 1.22.0
- 1.21.1
- 1.20.0
- 1.19.1
- 1.19.0
- 1.18.1
- 1.18.0
- 1.17.2
- 1.17.1
- 1.17.0
- 1.16.0
- 1.15.2
- 1.15.1
- 1.15.0
- 1.15.0-rc.2
- 1.15.0-rc.1
- 1.14.1
- 1.14.0
- 1.13.0
- 1.12.1
- 1.12.0
- 1.11.3
- 1.11.2
- 1.11.1
- 1.11.0
- 1.10.0
- 1.9.4
- 1.9.3
- 1.9.2
- 1.9.1
- 1.9.0
- 1.8.4
- 1.8.3
- 1.8.2
- 1.8.1
- 1.8.0
- 1.7.7
- 1.7.6
- 1.7.5
- 1.7.4
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.4
- 1.6.3
- 1.6.2
- 1.6.1
- 1.6.0
- 1.5.1
- 1.5.0
- 1.4.0
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.0
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-staging
- dev-SocalNick-patch-2
- dev-SocalNick-patch-1
This package is auto-updated.
Last update: 2024-10-26 14:35:46 UTC
README
Uses the HybridAuth PHP library to Enable authentication via Google, Facebook, Twitter, Yahoo!, etc for the ZfcUser ZF2 module.
Demo
Requirements
- Zend Framework 2 (2.*)
- ZfcBase (0.1.*)
- ZfcUser (1.4.*)
- HybridAuth (2.13.*)
- Extension php_curl enabled in php.ini
Features
- Login with AOL [NO LONGER SUPPORTED]
- Login with Facebook [COMPLETE]
- Login with Foursquare [COMPLETE]
- Login with Github [COMPLETE]
- Login with BitBucket [COMPLETE]
- Login with Google [COMPLETE]
- Login with LinkedIn [COMPLETE]
- Login with Live [INCOMPLETE]
- Login with MySpace [INCOMPLETE]
- Login with OpenID [INCOMPLETE]
- Login with Twitter [COMPLETE]
- Login with Yahoo! [COMPLETE]
- Login with Tumblr [COMPLETE]
- Login with Mail.Ru [COMPLETE]
- Login with Odnoklassniki [COMPLETE]
- Login with VKontakte [COMPLETE]
- Login with Yandex [COMPLETE]
- Login with Instagram [COMPLETE]
Installation
It is recommended to add this module to your Zend Framework 2 application using Composer. After cloning ZendSkeletonApplication, add "socalnick/scn-social-auth" to list of requirements, then run php composer.phar install/update. Your composer.json should look something like this:
{
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for ZF2",
"license": "BSD-3-Clause",
"keywords": [
"framework",
"zf2"
],
"homepage": "http://framework.zend.com/",
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "2.*",
"socalnick/scn-social-auth": "1.*"
}
}
Next add the required modules to config/application.config.php:
<?php
return array(
'modules' => array(
'Application',
'ScnSocialAuth',
'ZfcBase',
'ZfcUser',
),
'module_listener_options' => array(
'config_glob_paths' => array(
'config/autoload/{,*.}{global,local}.php',
),
'module_paths' => array(
'./module',
'./vendor',
),
),
);
Import the schemas for ZfcUser (./vendor/zf-commons/zfc-user/data/schema.sql
) and ScnSocialAuth (./vendor/socalnick/scn-social-auth/data/schema.sql
).
If you do not already have a valid Zend\Db\Adapter\Adapter in your service
manager configuration, put the following in ./config/autoload/database.local.php
:
<?php
$dbParams = array(
'database' => 'changeme',
'username' => 'changeme',
'password' => 'changeme',
'hostname' => 'changeme',
);
return array(
'service_manager' => array(
'factories' => array(
'Zend\Db\Adapter\Adapter' => function ($sm) use ($dbParams) {
return new Zend\Db\Adapter\Adapter(array(
'driver' => 'pdo',
'dsn' => 'mysql:dbname='.$dbParams['database'].';host='.$dbParams['hostname'],
'database' => $dbParams['database'],
'username' => $dbParams['username'],
'password' => $dbParams['password'],
'hostname' => $dbParams['hostname'],
));
},
),
),
);
If you do not already have a valid Zend\Session\SessionManager in your service
manager configuration, put the following in ./config/autoload/session.local.php
:
<?php
return array(
'service_manager' => array(
'invokables' => array(
'Zend\Session\SessionManager' => 'Zend\Session\SessionManager',
),
),
);
Options
Make sure to check the options available in ZfcUser: https://github.com/ZF-Commons/ZfcUser#options
The ScnSocialAuth module has two files that allow you to configure supported providers.
After installing ScnSocialAuth, copy
./vendor/socalnick/scn-social-auth/config/scn-social-auth.global.php.dist
to
./config/autoload/scn-social-auth.global.php
and change the values as desired.
Also copy
./vendor/socalnick/scn-social-auth/config/scn-social-auth.local.php.dist
to
./config/autoload/scn-social-auth.local.php
and change the values as desired.