PHP code example of socialiteproviders / superoffice

1. Go to this page and download the library: Download socialiteproviders/superoffice library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

socialiteproviders / superoffice example snippets


'superoffice' => [    
  'client_id' => env('SUPEROFFICE_CLIENT_ID'),  
  'client_secret' => env('SUPEROFFICE_CLIENT_SECRET'),  
  'redirect' => env('SUPEROFFICE_REDIRECT_URI'),
  'environment' => env('SUPEROFFICE_ENVIRONMENT'), // can be sod, qaonline or online depending on your apps approval stage
  'customer_id' => env('SUPEROFFICE_CUSTOMER_ID') 
],

Event::listen(function (\SocialiteProviders\Manager\SocialiteWasCalled $event) {
    $event->extendSocialite('superoffice', \SocialiteProviders\SuperOffice\Provider::class);
});

protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        // ... other providers
        \SocialiteProviders\SuperOffice\SuperOfficeExtendSocialite::class.'@handle',
    ],
];

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