1. Go to this page and download the library: Download movemoveapp/vkid 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/ */
movemoveapp / vkid example snippets
'vkid' => [
'client_id' => env('VKID_CLIENT_ID'),
'client_secret' => env('VKID_CLIENT_SECRET'),
'redirect' => env('VKID_REDIRECT_URI'),
// --- Extended configuration ---
'scopes' => env('VKID_SCOPES', ['email']), // default: ['email'], supports ['email','phone']
'pkce_ttl' => env('VKID_PKCE_TTL', 10), // minutes to store code_verifier
'cache_store' => env('VKID_CACHE_STORE', 'redis'), // cache store for PKCE verifier
'cache_prefix' => env('VKID_CACHE_PREFIX', 'socialite:vkid:pkce:'),
'api_version' => env('VKID_API_VERSION', '5.199'), // VK API version
],
use Illuminate\Support\Facades\Event;
use SocialiteProviders\Manager\SocialiteWasCalled;
use MoveMoveApp\VKID\VKIDExtendSocialite;
public function boot(): void
{
Event::listen(SocialiteWasCalled::class, [VKIDExtendSocialite::class, 'handle']);
}