PHP code example of laravel-socialite-providers / coding
1. Go to this page and download the library: Download laravel-socialite-providers/coding 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/ */
laravel-socialite-providers / coding example snippets
/**
* The event handler mappings for the application.
*
* @var array
*/
protected $listen = [
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
// add your listeners (aka providers) here
'LaravelSocialiteProviders\\Coding\\CodingExtendSocialite@handle',
],
];
'coding' => [
'client_id' => env('CODING_CLIENT_ID'),
'client_secret' => env('CODING_CLIENT_SECRET'),
'redirect' => env('CODING_CALLBACK_URL'),
'guzzle' => [
'base_uri' => 'https://' . env('CODING_TEAM') . '.coding.net/',
],
'scopes' => preg_split('/,/', env('CODING_SCOPES'), null, PREG_SPLIT_NO_EMPTY), // optional, can not use explode, see vlucas/phpdotenv#175
],
return Socialite::with('coding')->redirect();
// to turn off stateless
return Socialite::with('coding')->stateless(false)->redirect();
// to use stateless
return Socialite::with('coding')->stateless()->redirect();