PHP code example of upwebdesign / infusionsoft-socialite

1. Go to this page and download the library: Download upwebdesign/infusionsoft-socialite 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/ */

    

upwebdesign / infusionsoft-socialite example snippets


'infusionsoft' => [
    'client_id' => env('INFUSIONSOFT_CLIENT_ID'),
    'client_secret' => env('INFUSIONSOFT_CLIENT_SECRET'),
    'redirect' => env('INFUSIONSOFT_REDIRECT_URI', '/auth/infusionsoft/callback'),
    'auth' => env('INFUSIONSOFT_AUTH_URI', '/auth/infusionsoft/redirect'),
],

protected $listen = [
    Registered::class => [SendEmailVerificationNotification::class],
    InfusionsoftSocialiteAuthenticated::class =>[
      // Place your listener here...
    ]
];

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

$token = Socialite::driver('infusionsoft')->getToken();

$user return Socialite::driver('infusionsoft')->user();

Laravel\Socialite\Two\User {#319 ▼
  +token: "********"
  +refreshToken: "********"
  +expiresIn: 86399
  +approvedScopes: array:1 [▶]
  +id: null
  +nickname: null
  +name: "Jane Doe"
  +email: "jane@example.com"
  +avatar: "https://cdn.com/avatar.jpg"
  +user: array:14 [▼
    "name" => "Jane Doe"
    "email" => "jane@example.com"
    "website" => "https://google.com/"
    "phone" => null
    "address" => array:9 [▶]
    "phone_ext" => null
    "time_zone" => "America/New_York"
    "logo_url" => "https://cdn.com/avatar.jpg"
    "currency_code" => "USD"
    "language_tag" => "en-US"
    "business_type" => null
    "business_goals" => []
    "business_primary_color" => null
    "business_secondary_color" => null
  ]
}