2017 © Pedro Peláez
 

library oneauth

Social Authentication Extension for Orchestra Platform

image

orchestra/oneauth

Social Authentication Extension for Orchestra Platform

  • Tuesday, January 10, 2017
  • by crynobone
  • Repository
  • 3 Watchers
  • 4 Stars
  • 462 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Social Authentication Extension for Orchestra Platform

Social Authentication Extension for Orchestra Platform, (*1)

Latest Stable Version Total Downloads MIT License Build Status Scrutinizer Quality Score, (*2)

Table of Content

Version Compatibility

Laravel OneAuth
5.0.x 3.0.x
5.1.x 3.1.x@dev
5.2.x 3.2.x@dev

Installation

To install through composer, simply put the following in your composer.json file:, (*3)

{
    "require": {
        "orchestra/oneauth": "~3.0"
    }
}

And then run composer install to fetch the package., (*4)

Quick Installation

You could also simplify the above code by using the following command:, (*5)

composer require "orchestra/oneauth=~3.0"

Usage

In app/Http/routes.php:, (*6)

<?php

Route::get('social/{provider}/connect', [
    'uses'  => 'Auth\SocialController@connect'
])->where('{provider}', '(.+)');

In app/Http/Controllers/Auth/SocialController.php:, (*7)

<?php namespace App\Http\Controllers\Auth;

use Illuminate\Http\Request;
use Illuminate\Contracts\Auth\Guard;
use App\Http\Controllers\Controller;
use Orchestra\OneAuth\Contracts\Listener\ConnectUser;
use Orchestra\OneAuth\Processor\AuthenticateUser as Processor;

class SocialController extends Controller implements ConnectUser
{
    /**
     * Connect with social provider.
     *
     * @param  \Orchestra\OneAuth\Processor\AuthenticateUser  $processor
     * @param  \Illuminate\Http\Request  $request
     * @param  string  $provider
     * @return mixed
     */
    public function connect(Processor $processor, Request $request, $provider = 'facebook')
    {
        return $processor->execute($this, $provider, $request->has('code'));
    }

    /**
     * Response when user has connected.
     *
     * @param  array  $data
     * @param  \Illuminate\Contracts\Auth\Guard  $auth
     * @return mixed
     */
    public function userHasConnected(array $data, Guard $auth)
    {
        return redirect(handles('app::/'));
    }
}

The Versions

10/01 2017

dev-master

9999999-dev

Social Authentication Extension for Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

orchestral social-login orchestra-platform

21/06 2015

3.1.x-dev

3.1.9999999.9999999-dev

Social Authentication Extension for Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

orchestral social-login orchestra-platform

18/06 2015

v3.1.0-BETA2

3.1.0.0-beta2

Social Authentication Extension for Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

orchestral social-login orchestra-platform

27/05 2015

3.0.x-dev

3.0.9999999.9999999-dev

Social Authentication Extension for Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

orchestral social-login orchestra-platform

18/05 2015

v3.1.0-BETA1

3.1.0.0-beta1

Social Authentication Extension for Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

orchestral social-login orchestra-platform

27/04 2015

v3.0.0

3.0.0.0

[WIP] Social Authentication Extension for Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires