PHP code example of caesar-dev / socialite-provider-word-press-custom-endpoint

1. Go to this page and download the library: Download caesar-dev/socialite-provider-word-press-custom-endpoint 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/ */

    

caesar-dev / socialite-provider-word-press-custom-endpoint example snippets


'wordpress' => [
    'client_id' => env('WORDPRESS_KEY'),
    'client_secret' => env('WORDPRESS_SECRET'),
    'redirect' => env('WORDPRESS_REDIRECT_URI'),  
    'api_top_endpoint' => env('WORDPRESS_API_TOP_ENDPOINT'),
    'api_endpoint' => env('WORDPRESS_API_ENDPOINT'),
],

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

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