Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- config.php: main config
- ------------------------------------
- 'packages' => array(
- 'orm',
- 'auth',
- 'oauth',
- 'oauth2',
- 'ninjauth'
- ),
- ninjauth.php: NinjAuth config
- -------------------------------------
- 'providers' => array(
- 'facebook' => array(
- 'id' => '396498410397264',
- 'secret' => '974163a3254487c48d023a9b28231cb0',
- 'scope' => array( 'email', 'offline_access' ),
- ),
- 'twitter' => array(
- 'key' => 'HS68DfAm2CNyNFb9lvhNlQ',
- 'secret' => 'UGRn2pYE39dpcRmHZjKiJ0hkiWGYWkAwmq6jQznw4',
- ),
- ),
- auth.php: NinjAuth controller
- --------------------------------------
- class Controller_Auth extends \NinjAuth\Controller {}
- login-form.php: login form and links for NinjAuth
- ---------------------------------------
- ?>
- <p>
- <a href="<?php echo Uri::create( 'auth/session/facebook' ) ?>" class="facebook">Connect with Facebook</a>
- </p>
- <p>
- <a href="<?php echo Uri::create( 'auth/session/twitter' ) ?>" class="twitter">Connect with Twitter</a>
- </p>
- <p>
- <a href="<?php echo Uri::create( 'auth/session/google' ) ?>" class="google">Connect with Google</a>
- </p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement