VKontakte signs users in with their VK account, the dominant consumer social network in Russian-speaking markets.
Copy the redirect URI
In the Authdog console, select the project and environment, open Authentication > Providers, find VKontakte, and click Enable. Copy the redirect URI shown in the form:
https://identity.authdog.com/api/v1/callback/<connectionId>Create the application
- Open VK for Developers and create an application of type Website.
- Set the site address and the Authorized redirect URI to the redirect URI from Authdog.
- Copy the Application ID and the Secure key.
Configure Authdog
| Field | Value |
|---|---|
| Client ID | The VK Application ID |
| Client Secret | The VK Secure key |
Save, then toggle the connection active.
What VKontakte returns
Authdog requests the email scope and reads the profile from https://api.vk.com/method/users.get.
The users endpoint returns the numeric VK id, first and last name, and avatar. The email arrives with the token response rather than the profile call.
VK requires the application to be published before users outside the app's admins can authorize it.
Test it
- Open your environment's hosted sign-in page, or link to
https://identity.authdog.com/api/v1/signin/<connectionId>. - Select the VKontakte button and complete the flow.
- Confirm the user appears under Users in the console with a VKontakte identity linked.
Troubleshooting
| Symptom | Cause |
|---|---|
redirect_uri is incorrect |
The URI is missing from the app's authorized list |
| Only admins can sign in | The VK application is unpublished |
| Redirect or callback URL error | The URI registered with the provider does not match Authdog's exactly |
| Works in one environment only | Each environment has its own connectionId, and so its own redirect URI to register |
Related
| Read | To learn how to |
|---|---|
| Connectors | Set up any other social provider |