PHP code example of creatvstudio / socialite-auth

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

    

creatvstudio / socialite-auth example snippets


'facebook' => [
    'client_id' => env('FACEBOOK_CLIENT_ID'),
    'client_secret' => env('FACEBOOK_CLIENT_SECRET'),
    'redirect' => env('APP_URL') . '/login/facebook/callback',
],

'github' => [
    'client_id' => env('GITHUB_CLIENT_ID'),
    'client_secret' => env('GITHUB_CLIENT_SECRET'),
    'redirect' => env('APP_URL') . '/login/github/callback',
],

use Illuminate\Support\Facades\Auth;

protected function guard()
{
    return Auth::guard('guard-name');
}
bash
php artisan make:controller Auth/SocialiteController
bash
/**
 * The user has been authenticated.
 *
 * @param \Illuminate\Http\Request $request
 * @param mixed $user
 * @return mixed
 */
protected function authenticated(Request $request, $user)
{
    // Do anything here
}