PHP code example of socialiteproviders / sharepoint

1. Go to this page and download the library: Download socialiteproviders/sharepoint 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 / sharepoint example snippets


'sharepoint' => [    
  'client_id' => env('SHAREPOINT_CLIENT_ID'),  
  'client_secret' => env('SHAREPOINT_CLIENT_SECRET'),  
  'redirect' => env('SHAREPOINT_REDIRECT_URI'),
  'site_url' => env('SHAREPOINT_SITE_URL'), // Optional
],

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

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

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