PHP code example of rzb / social-auth

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

    

rzb / social-auth example snippets

 bash
$ php artisan migrate
 php
    POST /auth/social/{provider}/{sociable}
    [
        'access_token' => '
 php
    // config/socialauth.php
    
    'routes' => [
        'controller' => SocialAuthController::class,
        'middleware' => null,
        'prefix' => 'auth/social',
    ],
 php
use Laravel\Socialite\Contracts\User as SocialUser;

public static function createFromSocialUser(SocialUser $socialUser): self
{
    return self::forceCreate([
        // map your model attributes here
        'email' => $socialUser->getEmail(),
        'name' => $socialUser->getName(),
    ]);
}