VK social login guide
VK is a social media/social networking website based in Russia. VK has over 400 million subscribers.
Before you begin
To use VK for social login you must:
-
Obtain a VK developer’s account from https://vk.com/dev.
-
Do one of the following:
- Open a previously-created VK app, and copy the application ID and secure key.
- Create a new VK app and copy the application ID and secure key.
-
Use the Social Login Dashboard and the VK application ID and secure key to configure VK as a social login provider.
Create a VK app
This section walks you through the process of creating a VK app for social login. If you already have an app, see the Using an Existing VK App for Social Login section of this documentation.
To configure a VK app, complete the following procedure:
-
Log on to the VK Developers center (https://vk.com/dev).
-
On the My Apps page, click Create:
-
On the Create an app page, enter a name for your app in the Title field and then select Website:
-
Enter your website URL in the Website address field, and enter your URL (minus the HTTP or HTTPS) protocol in the Base domain field:
-
Click Connect website.
-
In the Confirm action dialog, click Call. A telephone call will be placed to the phone number specified in your developer account. To complete the app creation process, you'll need to supply the last four digits of the phone number used to place the call:
-
As appropriate, supply any additional information about your site (such as URLs for your terms of service and/or privacy policy) on the Information tab:
-
Click Settings.
-
Enter your redirect URI in the Authorized redirect URI field. If you are using a standard Identity Cloud domain, your redirect URL will look similar to this: https://greg-stemp.rpxnow.com/vk/callback. For example:
-
Copy the VK App**ID and Secure key** values:
These values are needed in order to configure VK for social login.
-
Click Save, and then log off from the VK developer center.
Use an existing VK app for social login
If you already have a VK app that can be used for social login, complete the following steps to retrieve the application ID and secure key:
-
Log on to the VK Developers site (https://vk.com/dev).
-
On the My Apps page, locate the app you want to use for configuring social login and then click Manage:
-
From the home page for your app, click Settings.
-
From the Settings page, copy the App**ID and the Secure key**:
-
Log off from the VK Developers site.
Configure VK as a social login provider
To configure VK as a social login provider, make sure you have your VK OAuth application ID and secure key, and then complete the following procedure:
-
Log on to your Social Login Dashboard (https://dashboard.janrain.com).
-
From the Dashboard home page, click the Manage Engage Dashboard icon.
-
From the Engage Dashboard home page, in the Widgets and SDKs section, click Sign-Ins.
-
From the Sign-in page, verify that Widget is selected and then expand Providers.
-
From the list of Providers, click VK.
-
In the VK dialog box, click Next until you reach the screen requesting the application ID and secure key:
-
Paste your VK application ID in the Application ID field, paste your VK secure key in the Secure Key field, and then click Save. VK appears in your social login widget.
-
When you are finished, select Save and Publish and then click Publish. It might take as long as one hour before VK appears as a social login option on your web site.
Test VK social login
To test VK social login, complete the following procedure:
-
Do one of the following:
-
If you have just published your widget settings, click the Test your widget link that appears after the widget has been saved.
-
If you previously published your widget settings then, from the Engage Dashboard Sign-in page, click Launch a test widget.
-
-
From the Test page, click the VK icon:
-
In the VK | Login window, logon using a valid VK account:
-
If login succeeds, information returned from the VK profile is displayed in the API response preview field:
The returned profile information will vary depending on the VK account used in the test and the profile information you requested for VK. You can verify VK profile fields by completing the following procedure:
-
From the Engage Dashboard home page, click the Manage Providers icon:
-
From the Configure Providers page, click VK.
-
Profile information returned from VIK is displayed onscreen. For example:
Fields not marked with an Off or an Ask label are automatically returned when a user logs on using a VK account.
For fields that are marked with a label, click Off to request that the information be returned. The Off label will change to Ask, meaning that, at logon time, the user will be asked whether he or she gives permission for that data to be returned:
For example, if you ask for a user’s contact information during logon, he or she will see the following message before they log on:
The user can either click Allow to forward all the requested information, or can click Cancel to terminate logon.
On the Configure Providers page, click Ask to turn off the information request.
Assign a different VK app for social login
If you want to use a different VK app or if you need to change your existing app, you must update the VK provider configuration settings. To do that, complete the following procedure:
-
From the Engage Dashboard home page, click the Manage Providers icon:
-
From the Configure Providers page, click VK.
-
Click the green Configured button to display the VK is currently enabled dialog box:
-
To change the VK configuration, click Modify these settings.
-
In the VK dialog box, change the Application ID and/or Secure Key as needed, and then click Save:
Although you can modify your VK settings, you cannot delete those settings. If you delete the settings and then try to save your changes, you’ll see the error message Please enter your Consumer Key and Secret exactly as VK shows them.
This means that you cannot “unconfigure” the provider: once configured, the VK icon will always be shown as green (i.e., configured) in the Social Login Dashboard.
Remove VK as a social login provider
If you no longer want to use VK for social login, you can remove VK as a social login provider by completing the following procedure:
-
Log on to your Social Login Dashboard (https://dashboard.janrain.com).
-
From the Dashboard home page, click the Manage Engage Dashboard icon.
-
From the Engage Dashboard home page, in the Widgets and SDKs section, click Sign-Ins.
-
From the Sign-in page, verify that Widget is selected and then expand Providers.
-
In the widget, click the X in the upper right corner of the VK icon.
-
Scroll to the bottom of the page, select Save and Publish, and then click Publish. VK no longer appears in the sign-on widget.
You must always have at least one social login provider in the widget. If you delete all the providers and then click Publish, you’ll see the error message Couldn’t save configuration: No providers.
Updated over 1 year ago