PHP code example of socialiteproviders / kinde

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


'kinde' => [
  'domain' => env('KINDE_DOMAIN'),
  'client_id' => env('KINDE_CLIENT_ID'),
  'client_secret' => env('KINDE_CLIENT_SECRET'),
  'redirect' => env('KINDE_CALLBACK_URL'),
],

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

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

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

$user = Socialite::driver('kinde')->user();

$rawUser = $user->getRaw();

$orgCode = $rawUser['org_code'];
$permissions = $rawUser['permissions'];