Code Monkey home page Code Monkey logo

opauth-laravel's Introduction

Opauth For Laravel

Version 0.2 - Release Date: 17.01.2013

This is based on Opauth - http://opauth.org/

Authorize users with your application implementing multiple Oauth2 providers. Demo: http://fakeheal.eu/opauth-bundle/public/

Currently Supported

  • Facebook
  • Twitter

** I've only tested it with Facebook. This does not mean that it won't work for other Oauth2 providers. Refer to http://opauth.org/ for help on implementing it. **

Usage Example

http://example.com/opauth-bundle/public/facebook

Route::get('/', array('uses' => 'home@index'));

Route::get('facebook, facebook/(:any)', array('as' => 'facebook', function() {
	Laravel\IoC::resolve('opauth-facebook');
}));

Route::post('done', array('as' => 'done', function(){
	$response = unserialize(base64_decode( $_POST['opauth'] ));
    echo '<pre>';
    print_r($response);
    echo '</pre>';
}));

After authorizing you'll be redirect to a link you've specified in: /bundles/opauth/start.php

$config = array(
	'Strategy' => array(
		'Facebook' => array(
			'app_id' => 'YOUR_APP_ID',
			'app_secret' => 'YOUR_APP_SECRET'
		)		
	),
	'security_salt'	=> 'YOURSALTGOESHERE!',
	'path' 			=> '/opauth-bundle/public/',
	'callback_transport' => 'post',
	'callback_url'	=> '/opauth-bundle/public/done'
);

##DO NOT FORGET TO CHANGE YOUR APP_ID & APP_SECRET

opauth-laravel's People

Contributors

fakeheal avatar

Watchers

Flávio H. Ferreira avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.