Skip to content

Bodom78/kohana-kopauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#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.

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages