Download the PHP package movemoveapp/vkid without Composer
On this page you can find all versions of the php package movemoveapp/vkid. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package vkid
VK ID (OAuth 2.1 + PKCE)
На Русском
Register an application
Create a new VK ID application at id.vk.ru. Make sure you specify the correct redirect URI (must match exactly with the one in your config).
Installation & Basic Usage
Please see the Base Installation Guide first, then follow the VK ID-specific instructions below.
Add configuration to config/services.php
Add provider event listener
Laravel 11+
Since Laravel 11 removed EventServiceProvider, use the Event facade in your AppServiceProvider@boot:
Laravel 10 or below
Add the listener in your `app/Providers/EventServiceProvider.php`. See the [Base Installation Guide](https://socialiteproviders.com/usage/) for detailed instructions.Usage
You can now use the driver as usual with Socialite:
For extended scopes (e.g. apps with Business Account permission):
Handling the callback:
Returned User fields
| Field | Description |
|---|---|
id |
VK user ID |
nickname |
screen_name (if present) |
name |
First + last name |
email |
from id_token (if scope=email) |
avatar |
URL to 200px profile photo |
phone |
from id_token (if scope=phone and granted) |
Exception Reference
| Exception | Cause | Recommended handling |
|---|---|---|
Laravel\Socialite\Two\InvalidStateException |
- state or PKCE verifier missing or expired- user waited longer than pkce_ttl minutes before pressing “Allow” | Ask user to restart login. Show message like “Authorization expired. Please try again.” |
RuntimeException("VKID PKCE cache failure") |
Cache store misconfigured or unavailable (e.g., Redis down) | Log and retry later. Typically a server-side infra issue. |
RuntimeException("VKID PKCE cache failure: unable to persist code_verifier") |
Misconfigured cache_store or permission issue writing PKCE state | Ensure correct cache driver in config/cache.php |
Any other exception |
Networking or unexpected JSON format | Generic fallback “VK ID login failed” |
All exceptions extend base \Throwable and can be caught globally in your app’s Handler.
Extended Configuration Options
| Key | Type | Default | Description |
|---|---|---|---|
| `client_id | string | – | VK App ID |
| `client_secret | string | – | VK App secret |
| `redirect | string | – | Full callback URL (must match app settings) |
| `scopes | array | ['email'] | Default OAuth scopes |
| `pkce_ttl | int | 10 | Time in minutes to store PKCE verifier |
| `cache_store | string | 'redis' | Cache store for PKCE (see config/cache.php) |
| `cache_prefix | string | 'socialite:vkid:pkce:' | Prefix for PKCE keys |
| `api_version | string | '5.199' | VK API version for users.get |
Example .env
Example User Flow Diagram
Reference
All versions of vkid with dependencies
ext-json Version *
socialiteproviders/manager Version ^4.4
laravel/socialite Version ^5.6 || ^6.0
illuminate/support Version ^10.0 || ^11.0 || ^12.0