seocom/social_login

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (dev-master) of this package.

Installs: 146

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 1

Open Issues: 0

Type:cakephp-plugin

dev-master 2014-04-02 04:24 UTC

This package is not auto-updated.

Last update: 2016-02-11 11:05:45 UTC


README

A CakePHP plugin built to facilitate the Opauth 1.0 functionality.

Installation of Plugin

Insert the following in your Config/bootstrap.php file:

CakePlugin::load(['SocialLogin' => ['routes' => true]]);
Configure::write('Opauth', [
    'Strategy' => [
        'Twitter' => [
            'key' => 'twitter_key',
            'secret' => 'twitter_secret'
        ],
        'Facebook' => [
            'app_id' => 'facebook_app_id',
            'app_secret' => 'facebook_app_secret'
        ],
        'Google' => [
            'client_id' => 'google_client_id',
            'client_secret' => 'google_client_secret'
        ],
        'LinkedIn' => [
            'api_key' => 'linkedin_api_key',
            'secret_key' => 'linkedin_secret_key'
        ],
    ],
    'path' => '/login/',
    'redirect' => '/where-to-redirect-after-login'
]);

Then run: composer install/update

Testing

If you want to authorize your app with Google, first create your Google app. Next, add your client_id and client_secret in your config array (see above). Finally, browse to yourapp.com/login/google. The app should prompt you to authorize through your Google account, and then redirect you to the page you specified in your config array.