PHP code example of socialiteproviders / bexio

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


'bexio' => [
  'client_id' => env('BEXIO_CLIENT_ID'),
  'client_secret' => env('BEXIO_CLIENT_SECRET'),
  'redirect' => env('BEXIO_REDIRECT_URI')
],

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

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

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

$externalUserData = Socialite::driver($driver)->user();

$externalUserData->id,// null
$externalUserData->email,// User's email
$externalUserData->nickname,// null
$externalUserData->given_name,// First name from bexio profile
$externalUserData->family_name,// Last name from bexio profile
$externalUserData->name,// First and Last names combined
$externalUserData->gender,// Gender from bexio profile
$externalUserData->locale,// en_GB string or other locale definition