PHP code example of socialiteproviders / starling

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


'starling' => [
  'client_id' => env('STARLING_CLIENT_ID'),
  'client_secret' => env('STARLING_CLIENT_SECRET'),
  'redirect' => env('STARLING_REDIRECT_URI'),
  'env' => env('STARLING_ENV'),
  'use_mtls' => env('STARLING_USE_MTLS')
],

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

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

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