zipzoft/laravel-id-socialite-provider

1.1.1 2020-12-22 08:58 UTC

This package is auto-updated.

Last update: 2023-08-22 14:56:34 UTC


README

Installation & Basic Usage

composer require zipzoft/laravel-id-socialite-provider

Add configuration to config/services.php

'zipzoft' => [
  'client_id' => env('CLIENT_ID'),
  'client_secret' => env('CLIENT_SECRET'),
  'redirect' => env('CLIENT_REDIRECT_URI')
],

Add provider event listener

Configure the package's listener to listen for SocialiteWasCalled events.

Add the event to your listen[] array in app/Providers/EventServiceProvider

protected $listen = [
  \SocialiteProviders\Manager\SocialiteWasCalled::class => [
    // ... other providers
    \Zipzoft\ID\SocialiteProviderExtend::class,
  ],
];

Usage

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

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