WeChat Social Login Configuration Guide


WeChat is a Chinese social media application that has nearly 1 billion active users each month.

Before You Begin

Although not detailed in this configuration guide, you can create a new WeChat app that enables users to log on to your web site by using their WeChat account. To create a WeChat developer account, you must complete a lengthy application process that requires supplying information such as your personal ID and business license:

If you already have a WeChat developer account, you can create a social login app from the WeChat developer’s site (https://open.wechat.com).

Note. Web pages on the WeChat Developers site are written in Chinese. If you do not speak Chinese, you might want to use a web browser than can translate the WeChat web pages. For this configuration guide, we used Google Chrome and its Translate to English option.

In This Configuration Guide

  • Configuring WeChat as a Social Login Provider
  • Testing WeChat Social Login
  • Assigning a Different WeChat App for Social Login
  • Removing WeChat as a Social Login Provider

Configuring WeChat as a Social Login Provider

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

  1. Paste your WeChat application key in the Application Key field, paste your WeChat application secret in the Application Secret field, and then click Save. WeChat 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 WeChat appears as a social login option on your web site.

Testing WeChat Social Login

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

  1. In the Login to WeChat window, logon using a valid WeChat account:

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

The returned profile information will vary depending on the WeChat account used in the test.

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

See Also


Assigning a Different WeChat App for Social Login

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

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

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

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


Removing WeChat as a Social Login Provider

You can remove WeChat 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 WeChat icon.
  6. Scroll to the bottom of the page, select Save and Publish, and then click Publish. WeChat 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.