PHP code example of lubos / opauth

1. Go to this page and download the library: Download lubos/opauth library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lubos / opauth example snippets


   
   CakePlugin::load('Opauth', array('routes' => true, 'bootstrap' => true));
   

   
   CakePlugin::load('Opauth', array('routes' => true, 'bootstrap' => true));
   
   // Using Facebook strategy as an example
   Configure::write('Opauth.Strategy.Facebook', array(
       'app_id' => 'YOUR FACEBOOK APP ID',
       'app_secret' => 'YOUR FACEBOOK APP SECRET',
	   'redirect' => '/'
   ));
   

 // APP/Config/bootstrap.php
Configure::write('Opauth.path', '/your-cake-app/auth/');
Configure::write('Opauth.callback_url', '/your-cake-app/auth/callback');