2017 © Pedro Peláez
 

library manager

Easily add new or override built-in providers in Laravel Socialite.

image

socialiteproviders/manager

Easily add new or override built-in providers in Laravel Socialite.

  • Saturday, May 26, 2018
  • by AndyWendt
  • Repository
  • 8 Watchers
  • 198 Stars
  • 764,103 Installations
  • PHP
  • 239 Dependents
  • 0 Suggesters
  • 43 Forks
  • 9 Open issues
  • 55 Versions
  • 14 % Grown

The README.md

Socialite Providers Manager

Build Status codecov Scrutinizer Code Quality Latest Stable Version Total Downloads Latest Unstable Version License StyleCI SensioLabsInsight, (*1)

About

A package for Laravel Socialite that allows you to easily add new providers or override current providers., (*2)

Benefits

  • You will have access to all of the providers that you load in using the manager.
  • Instantiation is deferred until Socialite is called
  • You can override current providers
  • You can create new providers
  • Lumen usage is easy
  • stateless() can be set to true or false
  • You can override a config dynamically
  • It retrieves environment variables directly from the .env file instead of also having to configure the services array.

Available Providers

Reference

Creating a Handler

Below is an example handler. You need to add this full class name to the listen[] in the EventServiceProvider., (*3)

namespace Your\Name\Space;

use SocialiteProviders\Manager\SocialiteWasCalled;

class ProviderNameExtendSocialite
{
    public function handle(SocialiteWasCalled $socialiteWasCalled)
    {
        $socialiteWasCalled->extendSocialite('providername', \Your\Name\Space\Provider::class);
    }
}

Creating a Provider

Overriding a Built-in Provider

You can easily override a built-in laravel/socialite provider by creating a new one with exactly the same name (i.e. 'facebook')., (*4)

Dynamically Passing a Config

You can dynamically pass a config by using:, (*5)

$clientId = "secret";
$clientSecret = "secret";
$redirectUrl = "http://yourdomain.com/api/redirect";
$additionalProviderConfig = ['site' => 'meta.stackoverflow.com'];
$config = new \SocialiteProviders\Manager\Config($clientId, $clientSecret, $redirectUrl, $additionalProviderConfig);
return Socialite::with('provider-name')->setConfig($config)->redirect();

You must call this before you run any Socialite methods., (*6)

Creating an OAuth1 Server Class

Take a look at the other OAuth1 providers for inspiration., (*7)

Getting the Access Token Response Body

Laravel Socialite by default only allows access to the access_token. Which can be accessed via the \Laravel\Socialite\User->token public property. Sometimes you need access to the whole response body which may contain items such as a refresh_token., (*8)

To make this possible, the OAuth2 provider class needs to extend \SocialiteProviders\Manager\OAuth2\AbstractProvider and OAuth1 providers need to utilize the \SocialiteProviders\Manager\OAuth1\AbstractProvider and \SocialiteProviders\Manager\OAuth1\Server., (*9)

You can access it from the user object like so: $user->accessTokenResponseBody, (*10)

The Versions

26/05 2018

dev-master

9999999-dev

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

26/05 2018

dev-analysis-ze2gDv

dev-analysis-ze2gDv

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

12/02 2018

dev-analysis-qy0kLG

dev-analysis-qy0kLG

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

04/01 2018

dev-remove-env-config

dev-remove-env-config

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

04/01 2018

dev-analysis-zRM3Mp

dev-analysis-zRM3Mp

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

20/11 2017

v3.3.1

3.3.1.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

21/09 2017

v3.3.0

3.3.0.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

21/09 2017

dev-analysis-8Kx4xe

dev-analysis-8Kx4xe

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

20/09 2017

v3.2.1

3.2.1.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

20/09 2017

v3.2.0

3.2.0.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

28/08 2017

v3.1.0

3.1.0.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

27/07 2017

v3.0.5

3.0.5.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

07/02 2017

v3.0.4

3.0.4.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

06/02 2017

v3.0.3

3.0.3.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

27/01 2017

v3.0.2

3.0.2.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

25/01 2017

v3.0.1

3.0.1.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

25/01 2017

v3.0.0

3.0.0.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

04/12 2016

v2.2.1

2.2.1.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

04/12 2016

v2.2.0

2.2.0.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

01/11 2016

v2.1.9

2.1.9.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

04/08 2016

v2.1.8

2.1.8.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

04/08 2016

dev-fix-config

dev-fix-config

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

02/08 2016

v2.1.7

2.1.7.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

02/08 2016

v2.1.6

2.1.6.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

22/06 2016

v2.1.5

2.1.5.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

18/06 2016

v2.1.4

2.1.4.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

03/06 2016

v2.1.3

2.1.3.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

27/05 2016

v2.1.2

2.1.2.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

21/04 2016

v2.1.1

2.1.1.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

12/04 2016

v2.1.0

2.1.0.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

07/04 2016

v2.0.2

2.0.2.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

06/04 2016

v2.0.1

2.0.1.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

29/03 2016

v2.0.0

2.0.0.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

20/02 2016

1.2.4

1.2.4.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

18/01 2016

1.2.3

1.2.3.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

14/01 2016

1.2.2

1.2.2.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

14/01 2016

1.2.1

1.2.1.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

14/01 2016

1.2.0

1.2.0.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

13/01 2016

1.1.1

1.1.1.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

13/01 2016

1.1.0

1.1.0.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

08/01 2016

1.0.2

1.0.2.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

27/06 2015

1.0.1

1.0.1.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

18/06 2015

1.0.0

1.0.0.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

03/05 2015

2.0.x-dev

2.0.9999999.9999999-dev

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

03/05 2015

0.1.10

0.1.10.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

26/02 2015

0.1.9

0.1.9.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

26/02 2015

0.1.8

0.1.8.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

The Development Requires

21/02 2015

0.1.7

0.1.7.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

21/02 2015

0.1.6

0.1.6.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

21/02 2015

0.1.5

0.1.5.0

Easily add new or override built-in providers in Laravel Socialite.

  Sources   Download

MIT

The Requires

 

19/02 2015

0.1.4

0.1.4.0

An easy way to extend Laravel Socialite

  Sources   Download

MIT

The Requires

 

19/02 2015

0.1.3

0.1.3.0

An easy way to extend Laravel Socialite

  Sources   Download

MIT

The Requires

 

19/02 2015

0.1.2

0.1.2.0

An easy way to extend Laravel Socialite

  Sources   Download

MIT

The Requires

 

19/02 2015

0.1.1

0.1.1.0

An easy way to extend laravel/socialite

  Sources   Download

MIT

The Requires

 

19/02 2015

0.1

0.1.0.0

An easy way to extend laravel/socialite

  Sources   Download

MIT

The Requires