2017 © Pedro Peláez
 

library socialite_google

Google OAuth2 Provider for Laravel Socialite

image

akkyoh/socialite_google

Google OAuth2 Provider for Laravel Socialite

  • Saturday, July 30, 2016
  • by akkyoh
  • Repository
  • 1 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 15 Versions
  • 0 % Grown

The README.md

Google OAuth2 Provider for Laravel Socialite

Latest Stable Version Total Downloads Latest Unstable Version, (*1)

Install

1. COMPOSER, (*2)

composer require akkyoh/socialite_google

2. SERVICE PROVIDER - Remove Laravel\Socialite\SocialiteServiceProvider from your providers[] array in config\app.php if you have added it already. - Add \SocialiteProviders\Manager\ServiceProvider::class to your providers[] array in config\app.php., (*3)

// For example
'providers' => [
    // a whole bunch of providers
    // remove 'Laravel\Socialite\SocialiteServiceProvider',
    \SocialiteProviders\Manager\ServiceProvider::class, // add
];
  • If you would like to use the Socialite Facade, you need to install it.

3. ADD THE EVENT AND LISTENERS - Add SocialiteProviders\Manager\SocialiteWasCalled event to your listen[] array in /Providers/EventServiceProvider. - Add your listeners (i.e. the ones from the providers) to the SocialiteProviders\Manager\SocialiteWasCalled[] that you just created. - The listener that you add for this provider is 'Akkyoh\SocialiteGoogle\GoogleExtendSocialite@handle',. - Note: You do not need to add anything for the built-in socialite providers unless you override them with your own providers., (*4)

// For example
protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        // add your listeners (aka providers) here
        'Akkyoh\SocialiteGoogle\GoogleExtendSocialite@handle',
    ],
];

4. ENVIRONMENT VARIABLES, (*5)

If you add environment values to your .env as exactly shown below, you do not need to add an entry to the services array., (*6)

APPEND PROVIDER VALUES TO YOUR .ENV FILE
// other values above
GOOGLE_KEY=yourkeyfortheservice
GOOGLE_SECRET=yoursecretfortheservice
GOOGLE_REDIRECT_URI=https://example.com/login/
ADD TO CONFIG/SERVICES.PHP.

You do not need to add this if you add the values to the .env exactly as shown above. The values below are provided as a convenience in the case that a developer is not able to use the .env method, (*7)

'google' => [
    'client_id' => env('GOOGLE_KEY'),
    'client_secret' => env('GOOGLE_SECRET'),
    'redirect' => env('GOOGLE_REDIRECT_URI'),
],

USAGE

You should now be able to use it like you would regularly use Socialite (assuming you have the facade installed):, (*8)

return Socialite::driver('google') -> redirect();

RESOURCES

Socialite Providers Laravel Socialite Docs, (*9)

The Versions

30/07 2016

dev-master

9999999-dev

Google OAuth2 Provider for Laravel Socialite

  Sources   Download

MIT

The Requires

 

by Evgenij Rusachenko

30/07 2016

2.0.4

2.0.4.0

Google OAuth2 Provider for Laravel Socialite

  Sources   Download

MIT

The Requires

 

by Evgenij Rusachenko

30/07 2016

2.0.3

2.0.3.0

Google OAuth2 Provider for Laravel Socialite

  Sources   Download

MIT

The Requires

 

by Evgenij Rusachenko

30/07 2016

2.0.1

2.0.1.0

Google OAuth2 Provider for Laravel Socialite

  Sources   Download

MIT

The Requires

 

by Evgenij Rusachenko

30/03 2016

v2.0.0

2.0.0.0

Google OAuth2 Provider for Laravel Socialite

  Sources   Download

MIT

The Requires

 

18/06 2015

1.0.x-dev

1.0.9999999.9999999-dev

Google OAuth2 Provider for Laravel Socialite

  Sources   Download

MIT

The Requires

 

18/06 2015

v1.1.0

1.1.0.0

Google OAuth2 Provider for Laravel Socialite

  Sources   Download

MIT

The Requires

 

07/03 2015

v1.0.7

1.0.7.0

Google OAuth2 Provider for Laravel Socialite

  Sources   Download

MIT

The Requires

 

04/03 2015

v1.0.6

1.0.6.0

Google OAuth2 Provider for Laravel Socialite

  Sources   Download

MIT

The Requires

 

02/03 2015

v1.0.5

1.0.5.0

Google OAuth2 Provider for Laravel Socialite

  Sources   Download

MIT

The Requires

 

28/02 2015

v1.0.4

1.0.4.0

Google OAuth2 Provider for Laravel Socialite

  Sources   Download

MIT

The Requires

 

28/02 2015

v1.0.3

1.0.3.0

Google OAuth2 Provider for Laravel Socialite

  Sources   Download

MIT

The Requires

 

25/02 2015

v1.0.2

1.0.2.0

Google OAuth2 Provider for Laravel Socialite

  Sources   Download

MIT

The Requires

 

24/02 2015

v1.0.1

1.0.1.0

Google OAuth2 Provider for Laravel Socialite

  Sources   Download

MIT

The Requires

 

22/02 2015

v1.0.0

1.0.0.0

Google OAuth2 Provider for Laravel Socialite

  Sources   Download

MIT

The Requires