2017 © Pedro Peláez
 

library opauth-laravel

image

fakeheal/opauth-laravel

  • Monday, July 30, 2018
  • by FakeHeal
  • Repository
  • 2 Watchers
  • 35 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 1 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Opauth For Laravel 4.x

Version 1.0 - Release Date: 10.05.2016, (*1)

This is based on Opauth - http://opauth.org/, (*2)

Authorize users with your application implementing multiple Oauth2 providers., (*3)

Currently Supported

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., (*4)

Installation

Run: composer require fakeheal/opauth-laravel ~dev-laravel-4, (*5)

Or add this to your composer.json:, (*6)

"fakeheal/opauth-laravel": "dev-laravel-4",, (*7)

Usage Example

Install a strategy using composer:, (*8)

composer require opauth/facebook or composer require opauth/twitter, (*9)

Refer to the link that lists all available strategies and how to install them, (*10)

Add this to your app.php array of providers:, (*11)

'Fakeheal\OpauthLaravel\OpauthLaravelServiceProvider', (*12)

Publish the config file and add your strategies:, (*13)

php artisan config:publish fakeheal/opauth-laravel, (*14)

Config options: https://github.com/opauth/opauth/wiki/Opauth-configuration, (*15)

return [
    'Strategy' => array(
        'Facebook' => array(
            'app_id' => 'APP_ID',
            'app_secret' => 'APP_SECRET'
        )
    ),
    'security_salt' => 'RANDOM SOME HASH!',
    'callback_transport' => 'post',
    'path' => '/opauth/social/' //This must match the route for app('opauth')->run();
];

Add this to your routes.php:, (*16)

Route::get('/', function () {
    echo '<a href="/opauth/social/facebook">Login with facebook</a>';
});

Route::any('opauth/social/{strategy}/{action?}', function () {
    app('opauth')->run();
});

Open:, (*17)

http://localhost:8000/opauth/social/facebook, (*18)

DO NOT FORGET TO CHANGE YOUR APP_ID & APP_SECRET

The Versions

30/07 2018

dev-laravel-3

dev-laravel-3

  Sources   Download

10/05 2016

dev-master

9999999-dev

Package for using Opauth with Laravel

  Sources   Download

The Requires

 

by Ivanka Todorova

10/05 2016

dev-laravel-4

dev-laravel-4

Package for using Opauth with Laravel

  Sources   Download

The Requires

 

by Ivanka Todorova