PHP code example of atomjoy / socialites

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

    

atomjoy / socialites example snippets




return [
    'google' => [
        'client_id' => env('GOOGLE_CLIENT_ID'),
        'client_secret' => env('GOOGLE_CLIENT_SECRET'),
        'redirect' => env('GOOGLE_REDIRECT_URL'),
        'homepage' => env('GOOGLE_HOME_URL'),
    ],

    'github' => [
        'client_id' => env('GITHUB_CLIENT_ID'),
        'client_secret' => env('GITHUB_CLIENT_SECRET'),
        'redirect' => env('GITHUB_REDIRECT_URL'),
        'homepage' => env('GITHUB_HOME_URL'),
    ],

    'oauth_drivers' => ['github', 'google']
];



use Atomjoy\Socialites\Events\UserLogged;
use Atomjoy\Socialites\Events\UserCreated;



return [
    //...

    'facebook' => [
        'client_id' => env('FACEBOOK_CLIENT_ID'),
        'client_secret' => env('FACEBOOK_CLIENT_SECRET'),
        'redirect' => env('FACEBOOK_REDIRECT_URL'),
        'homepage' => env('FACEBOOK_HOME_URL'),
    ],

    'oauth_drivers' => ['github', 'google', 'facebook'],
];
sh
php artisan serve --host=localhost --port=8000
sh
# Copy Icons
php artisan vendor:publish --tag=socialites-assets --force

# Edit Views
php artisan vendor:publish --tag=socialites-views --force

# Create config example config/socialites.php
php artisan vendor:publish --tag=socialites-config --force