PHP code example of socialiteproviders / orcid

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


'orcid' => [    
  'client_id' => env('ORCID_CLIENT_ID'),  
  'client_secret' => env('ORCID_CLIENT_SECRET'),  
  'redirect' => env('ORCID_REDIRECT_URI') ,
  'environment' => env('ORCID_ENVIRONMENT'), // Optional
  'uid_fieldname' => env('ORCID_UID_FIELDNAME'), // Optional
],

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

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

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