Odnoklassniki Social Login Configuration Guide


Odnoklassniki is a social networking service popular in Russia. Approximately 200 million people have Odnoklassniki accounts.

Before You Begin

To use Odnoklassniki for social login you must:

  1. Obtain an Odnoklassniki developer account from https://www.odnosklassniki.ru/devaccess.
  2. Do one of the following:
    • From the email sent when you created an Odnoklassniki app, copy the application ID, public key, and secret key. (This information cannot be retrieved online.)
    • Create a new Odnoklassniki app and copy the application ID, public key, and secret key.
       
  3. Use the Janrain Dashboard to configure Odnoklassniki as a social login provider.
Note. Web pages on the Odnoklassniki Developers site are written in Russian. If you do not speak Russian, you might want to use a web browser than can translate the Odnoklassniki web pages. For this configuration guide, we used Google Chrome and its Translate to English option.

In This Configuration Guide

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

Creating an Odnoklassniki App

This section walks you through the process of creating an Odnoklassniki app for social login. If you already have an app, see the Using an Existing Odnosklassniki App for Social Login section of this documentation.

To configure an Odnosklassniki app, complete the following procedure:

  1. Log on to the Odnoklassniki Developers site (https://www.ok.ru/devaccess).
  2. On the Developer rights granting request page, select I have read and accept The Terms and Conditions of the Agreement, and then click Receive the developer rights:

  1. After the page updates, click Follow the link:

  1. On the My Uploads page, click Add App:

  1. On the App Settings page, click Add Platform:

  1. On the expanded App Settings page, enter:
    • The name of your app in the Title field.
    • A “nickname” for your app in the Shortname field. Note that you cannot use blank spaces in the short name.
    • A brief description of your app in the Description field.
  2. Scroll down the page to the Link to avatars and icons section. Enter URLs to online images of the specified size (for example 128 pixels by 128 pixels). Odnoklassniki verifies the image size; if your images are not the correct size, you will not be able to proceed:

  1. Scroll down the page and enter:
    • Your web site URL in the App link field.
    • Your Odnoklassniki redirect URL in the Callback link field. If you are using a standard Janrain domain, your redirect URL will look similar to this: https://greg-stemp.rpxnow.com/odnoklassniki/callback.
  2. Scroll further down the page. Next to the App size label, select Full screen:

  1. Click Save:

  1. In the App has been added dialog box, click Close:

  1. Log off from the Odnoklassniki developers site.
  2. Shortly after creating your app, you will receive an email listing your application ID, public key, and secret key:

  1. In the preceding email, the Application ID is 1257192448; the public key is CBANDQOLEBABABABA; and the secret key is C365B5F1AD5289F5359BC61A. Be sure and save this email; you cannot go online and retrieve the application ID, public key, or secret key.

Configuring Odnoklassniki as a Social Login Provider

To configure Odnoklassniki as a social login provider, make sure you have your Odnoklassniki application ID, public key, and secret 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 Odnoklassniki.
  6. In the Odnoklassniki dialog box, click Next until you reach the screen requesting the application ID, public key, and secret key:

  1. Paste your Odnoklassniki application ID in the Application ID field, paste your Odnoklassniki public key in the Public Key field, and then paste your Odnoklassniki secret key in the Secret Key field.
  2. Click Save. Odnoklassniki appears in your social login widget.
  3. When you are finished, select Save and Publish and then click Publish. It might take as long as one hour before Odnoklassniki appears as a social login option on your web site.

Testing Odnoklassniki Social Login

To test Odnoklassniki 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 Odnoklassniki icon:

  1. In the OK window, logon using a valid Odnoklassniki account:

  1. If login succeeds, information returned from the Odnoklassniki profile is displayed in the API response preview field:

The returned profile information will vary depending on:

  • The Odnoklassniki account used in the test.
  • The profile information you requested for Odnoklassniki.

You can verify Odnoklassniki 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 Odnoklassniki.
  2. Profile information returned from Odnoklassniki is displayed onscreen. For example:

Fields not marked with an Off or an Ask label are automatically returned when a user logs on using an Odnoklassniki 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:

On the Configure Providers page, click Ask to turn off the information request.

See Also


Assigning a Different Odnoklassniki App for Social Login

If you want to use a different Odnoklassniki app or if you need to change your existing app, you must update the Odnoklassniki 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 Odnoklassniki.
  2. Click the green Configured button to display the Odnoklassniki is currently enabled dialog box:

  1. To change the Odnoklassniki configuration, click Modify these settings.
  2. In the Odnoklassniki dialog box, change the Application IDPublic Key, and/or Secret Key as needed, and then click Save:

Although you can modify your Odnoklassniki 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 Odnoklassniki shows them.

This means that you cannot “unconfigure” the provider: once configured, the Odnoklassniki icon will always be shown as green (i.e., configured) in the Janrain Dashboard.


Removing Odnoklassniki as a Social Login Provider

If you no longer want to use Odnoklassniki for social login, you can remove Odnoklassniki 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 Odnoklassniki icon.
  6. Scroll to the bottom of the page, select Save and Publish, and then click Publish. Odnoklassniki 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.