PHP code example of andrewklau / socialite-openshift

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

    

andrewklau / socialite-openshift example snippets


/**
 * The event handler mappings for the application.
 *
 * @var array
 */
protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        // add your listeners (aka providers) here
        'Andrewklau\Socialite\OpenShift\OpenShiftExtendSocialite@handle',
    ],
];

'openshift' => [
    'client_id'     => env('OPENSHIFT_OAUTH_CLIENT_ID'),
    'client_secret' => env('OPENSHIFT_OAUTH_CLIENT_SECRET'),
    'url'           => env('OPENSHIFT_URL'),
    'ca'            => env('OPENSHIFT_CA'),
    'redirect'      => env('APP_URL').'/login/callback',
],

return Socialite::with('OpenShift')->scopes()->redirect();