VK Social Login Configuration 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:

  1. Obtain a VK developer’s account from https://vk.com/dev.
  2. 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.
       
  3. Use the Janrain Engage Dashboard and the VK application ID and secure key to configure VK as a social login provider.

In This Configuration Guide

  • Creating a VK App for Social Login
  • Using an Existing VK App for Social Login
  • Configuring VK as a Social Login Provider
  • Testing VK Social Login
  • Assigning a Different VK App for Social Login
  • Removing VK as a Social Login Provider

Creating 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:

  1. Log on the VK Developers site (https://vk.com/dev).
  2. From the VK Developers home page, click My apps:

  1. From the My applications page click Create an Application:

  1. On the Create an Application page, select Website and then click Connect Application:

  1. From the Confirmation required dialog box, click Get code:

  1. A confirmation code will be sent to you via text message. Type the code in the Confirmation code field and then click Confirm:

  1. On the Information page, type a title for your app in the Title field and then click Save:

  1. Click Settings. On the Settings page, enter:
    • Your website URL in the Site address field.
    • Your “base domain” (your website URL minus the HTTP:// or HTTPS:// protocol) in the Base domain field.
    • Your VK redirect URL in the Authorized redirect URI field. If you are using a standard Janrain domain, your redirect URL will look similar to this: https://greg-stemp.rpxnow.com/vk/callback.
       
  2. Click Save.
  3. Copy the VK Application ID and Secure key. You can copy this information to a text editor, then close the text editor after you have configured Janrain social login:

  1. Log off from the VK developer’s site.

Using 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:

  1. Log on to the VK Developers site (https://vk.com/dev).
  2. From the VK Developers home page, click My apps:

  1. From the My applications page, locate the app you want to use for configuring social login and then click Manage:

  1. From the home page for your app, click Settings:

  1. From the Settings page, copy the Application ID and the Secure key. You can copy this information to a text editor, then close the text editor after you have configured Janrain social login:

  1. Log off from the VK Developers site.

Configuring 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:

  1. Log on to your Janrain Dashboard (https://dashboard.janrain.com).
  2. From the Dashboard home page, click the Manage Engage Dashboard icon.
  3. From the Engage Dashboard home page, in the Widgets and SDKs section, click Sign-Ins.
  4. From the Sign-in page, verify that Widget is selected and then expand Providers.
  5. From the list of Providers, click VK.
  6. In the VK dialog box, click Next until you reach the screen requesting the application ID and secure key:

  1. 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.
  2. 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.

Testing VK Social Login

To test VK social login, complete the following procedure:

  1. 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.
       
  2. From the Test page, click the VK icon:

  1. In the VK | Login window, logon using a valid VK account:

  1. 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.
  • The profile information you requested for VK.

You can verify VK profile fields by completing the following procedure:

  1. From the Engage Dashboard home page, click the Manage Providers icon:

  1. From the Configure Providers page, click VK.
  2. 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.

See Also


Assigning 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:

  1. From the Engage Dashboard home page, click the Manage Providers icon:

  1. From the Configure Providers page, click VK.
  2. Click the green Configured button to display the VK is currently enabled dialog box:

  1. To change the VK configuration, click Modify these settings.
  2. 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 Janrain Dashboard.


Removing 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:

  1. Log on to your Janrain Dashboard (https://dashboard.janrain.com).
  2. From the Dashboard home page, click the Manage Engage Dashboard icon.
  3. From the Engage Dashboard home page, in the Widgets and SDKs section, click Sign-Ins.
  4. From the Sign-in page, verify that Widget is selected and then expand Providers.
  5. In the widget, click the X in the upper right corner of the VK icon.
  6. Scroll to the bottom of the page, select Save and Publish, and then click Publish. VK no longer appears in the sign-on widget.
Note. 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.