PHP code example of podcasthosting / socialiteprovider-podcastde

1. Go to this page and download the library: Download podcasthosting/socialiteprovider-podcastde 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/ */

    

podcasthosting / socialiteprovider-podcastde example snippets


'podcastde' => [
    'client_id'     => env('PODCASTDE_CLIENT_ID'),
    'client_secret' => env('PODCASTDE_CLIENT_SECRET'),
    'redirect'      => env('PODCASTDE_REDIRECT_URI'),
],

protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        \Podcasthosting\Podcastde\PodcastdeExtendSocialite::class,
    ],
];

use Laravel\Socialite\Facades\Socialite;

Route::get('/auth/podcastde', fn () => Socialite::driver('podcastde')->redirect());

Route::get('/auth/podcastde/callback', function () {
    $user = Socialite::driver('podcastde')->user();

    // $user->getId(), $user->getNickname(), $user->getName(),
    // $user->getEmail(), $user->getAvatar(), $user->token, ...
});

Socialite::driver('podcastde')->enablePKCE()->redirect();