1. Go to this page and download the library: Download katsana/socialite 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/ */
katsana / socialite example snippets
'providers' => [
// Other service providers...
Katsana\ServiceProvider::class,
Laravel\Socialite\SocialiteServiceProvider::class,
SocialiteProviders\Manager\ServiceProvider::class,
],
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
// Other events...
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
\Katsana\Socialite\Bootstrap::class,
],
];
namespace App\Http\Controllers\Auth;
use Laravel\Socialite\Facades\Socialite;
class PassportController extends Controller
{
/**
* Redirect the user to the KATSANA authentication page.
*
* @return Response
*/
public function redirectToProvider()
{
return Socialite::driver('katsana')->redirect();
}
/**
* Obtain the user information from KATSANA.
*
* @return Response
*/
public function handleProviderCallback()
{
$passport = Socialite::driver('katsana')->user();
// $passport->token;
}
}