PHP code example of mathieutu / lvconnect-socialite

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

    

mathieutu / lvconnect-socialite example snippets


 'lvconnect' => [
    'client_id' => env('LVCONNECT_ID'),
    'client_secret' => env('LVCONNECT_SECRET'),
    'redirect' => env('LVCONNECT_CALLBACK'),
],

    'url' => 'https://lvconnect-staging.herokuapp.com',

return $socialite->driver('lvconnect')->redirect();

// to turn off stateless
return Socialite::with('lvconnect')->stateless(false)->redirect();

// to use stateless
return Socialite::with('lvconnect')->stateless()->redirect();
bash 
php artisan lvconnect:publish

User {#341 ▼
  +accessTokenResponseBody: array:6 [▼
    "access_token" => "0bc47e47-1e88-4d08-a402-1cd7c235de3d"
    "token_type" => "bearer"
    "expires_in" => 172800
    "refresh_token" => "73a17012-b999-4300-8d4d-99e8675abc08"
    "scope" => array:3 [▼
      0 => "users:get"
      1 => "users:modify"
      2 => "profile:get"
    ]
    "need_password_change" => false
  ]
  +token: "0bc47e47-1e88-4d08-a402-1cd7c235de3d"
  +refreshToken: "73a17012-b999-4300-8d4d-99e8675abc08"
  +expiresIn: 172800
  +id: "589ae9cfe2eb1d0009790659"
  +nickname: null
  +name: "Foo BAR"
  +email: "[email protected]"
  +avatar: "https://www.gravatar.com/avatar/d5763d35fe855464633ff3ec5064ecad?s=200"
  +user: array:10 [▼
    "tags" => []
    "roles" => array:5 [▼
      0 => "tech"
      1 => "business"
      2 => "hr"
      3 => "board"
      4 => "com"
    ]
    "firstName" => "Foo"
    "lastName" => "BAR"
    "email" => "[email protected]"
    "createdAt" => "2017-02-08T09:50:07.813Z"
    "city" => "Lyon"
    "description" => "A really good friend!"
    "profilePictureUrl" => "https://www.gravatar.com/avatar/d5763d35fe855464633ff3ec5064ecad?s=200"
    "id" => "589ae9cfe2eb1d0009790659"
  ]
}