Skip to main content

WeChat Integration

WeChat is a widely used Chinese messaging and social media platform that supports OAuth-based authentication. This guide helps you integrate WeChat as a custom social login provider in your LoginRadius application.

Key Features

  • OAuth 2.0 support for secure login via WeChat

  • Supports both Chinese and International WeChat accounts

  • Custom user data mapping from WeChat to LoginRadius

  • Seamless integration with IDX and JS-based login forms

Use-Cases

  • Enable login for Chinese users via their existing WeChat identity.

  • Onboard verified customers from WeChat Official Accounts.

  • Extend identity coverage to Chinese markets and apps.

  • WeChat can be used as a social login method for global or localized applications.

Configuration

You must follow the below steps to configure Wechat with Loginradius:

  1. Create a WeChat account via a mobile app

  2. Register a Developer Account at https://open.weixin.qq.com

  3. Navigate to:

管理中心 (Control Center) > 网站应用 (Website Application)
  1. Click 创建网站应用 (Create Website Application)

  2. During registration, provide the callback URL:

https://<your_app>.hub.loginradius.com
  1. Once approved, you’ll receive an AppID and AppSecret.

Integration Details

  • Supports account creation and login via WeChat OAuth

  • Only verified WeChat developer accounts can register apps.

  • unionid acts as the unique identifier from WeChat and is required

  • Optional mapping for fields like nickname, avatar, etc., is supported.

Best Practices

  • Use an officially verified WeChat developer account to create an app.

  • Choose the correct API endpoints based on account region (China vs. International)

  • Ensure proper HTTPS callback URL during WeChat app registration.

  • Keep your AppSecret secure.

  • Monitor login success through the LoginRadius logs.