A Kohana module integrating Opauth which provides a standardized method to interface with authentication providers like Facebook, Google, Twitter and many others.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 4bba42f Oct 16, 2013
Permalink
Failed to load latest commit information.
classes Update Auth.php Oct 15, 2013
config initial import Sep 24, 2013
vendor/opauth initial import Sep 24, 2013
views/kopauth initial import Sep 24, 2013
README.md Update README.md Sep 24, 2013
init.php initial import Sep 24, 2013

README.md

#kohana-kopauth

A Kohana module integrating Opauth which provides a standardized method to interface with authentication providers like Facebook, Google, Twitter and many others.

Demo

Click here to see the Kopauth demo.

Adding the module

In your application/bootstrap.php file modify the call to Kohana::modules and include this module.

Kohana::modules(array(
    ...
    'kopauth'    => MODPATH.'kopauth',
    ...
));

Adding strategies

Find and download strategies at https://github.com/opauth/opauth#available-strategies

Extract each into a separate folder in MODPATH/kopauth/vendor/opauth/lib/Opauth/Strategy.

Refer to each strategies documentation for usage and configuration information.

Configuration

The kopauth config file is located in MODPATH/kopauth/config/kopauth.php.

You should copy this file to APPPATH/config/kopauth.php and make changes there, in keeping with the cascading filesystem.

Update the security_salt, Opauth will throw an error if you use the default value.

Add the required configuration for the strategies you added.

'Strategy' => array(
    ...
    'Facebook' => array(
        'app_id'     => 'YOUR APP ID',
        'app_secret' => 'YOUR APP SECRET',
    ),
    ...
)

For more information about available configuration keys and values visit https://github.com/opauth/opauth/wiki/Opauth-configuration

This module uses session for data storage. If you have not done so, add a cookie salt to your application/bootstrap.php.

Cookie::$salt = 'YOUR SECRET SALT';

Examples

This module comes with the online demo included.

Once configured, browse to http://yoursite.com/kopauth to access it. Note that this is disabled if your Kohana::$environment === Kohana::PRODUCTION.

The Kopauth class has additional methods to assist with authentication integration. View the example controller and views to help you get started.

Compatibility

This module is compatible with Kohana 3.3

Included Opauth version is 0.4.4

While in theory all strategies should work, only the following have been tested.