PHP code example of socialiteproviders / runsignup

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

    

socialiteproviders / runsignup example snippets


'runsignup' => [
    'environment'    => env('RUNSIGNUP_ENV', 'prod'),       // RunSignup Environment (`prod`, `test`)
    'client_id'      => env('RUNSIGNUP_CLIENT_ID'),         // Your Client ID
    'client_secret'  => env('RUNSIGNUP_CLINET_SECRET'),     // Your Client Secret
    'redirect'       => env('RUNSIGNUP_REDIRECT_URI'),      // Your Callback URI
],

Event::listen(function (\SocialiteProviders\Manager\SocialiteWasCalled $event) {
    $event->extendSocialite('runsignup', \SocialiteProviders\RunSignup\Provider::class);
});

protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        // ... other providers
        \SocialiteProviders\RunSignup\RunSignupExtendSocialite::class.'@handle',
    ],
];

use Laravel\Socialite\Facades\Socialite;

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

$rsuUser = Socialite::driver('runsignup')->user();

// Access mapped fields:
$rsuUser->getId();
$rsuUser->getName();
$rsuUser->getEmail();
$rsuUser->getAvatar();
$rsuUser->token;
$rsuUser->refreshToken;