PHP code example of laravelevetools / eve-socialite-provider
1. Go to this page and download the library: Download laravelevetools/eve-socialite-provider 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/ */
laravelevetools / eve-socialite-provider example snippets
'eveonline' => [
'client_id' => env('EVE_CLIENT_ID'),
'client_secret' => env('EVE_CLIENT_SECRET'),
'redirect' => env('EVE_CALLBACK_URL')
]
use App\Http\Controllers\Controller;
use Laravel\Socialite\Contracts\Factory as Socialite;
class TestLoginController extends Controller
{
const scopes = []; //define your scopes here
public function redirect(Socialite $social){
return $social->driver('eveonline')
->scopes(self::scopes)
->redirect();
}
public function callback(Socialite $social){
$eve_data = $social->driver('eveonline')
->scopes(self::scopes)
->user();
// Continue with User authentication as you see fit.
}
}