WeChat Connect
To use WeChat as a social login provider, you need the App ID and App Secret from your WeChat app. You’ll then copy and paste these keys into your ReachFive settings. This docs detail how to connect your WeChat application to your ReachFive account.
This page does not contain steps on creating a WeChat application. To create an application with WeChat, you should follow the official WeChat documentation. |
Complete the following steps to connect your WeChat application to ReachFive:
Create a WeChat application
You can create a website application or mobile application with WeChat. If you want to use both WeChat applications types with ReachFive, you need to create a separate application for mobile and webapp.
In the WeChat app creation process, where you’re asked for the Authorization callback domain, add https://{REACHFIVE_DOMAIN}/login/callback
, where REACHFIVE_DOMAIN
is your ReachFive domain.
|
Configure the WeChat application for iOS
If you are creating an iOS application for WeChat, there are some things you must do in order to ensure everything works properly. You need to:
-
Configure a universal link. You can do this under the iOS section in your WeChat application dashboard under the term Universal Links.
- Full link example
-
In your own iOS application, create an associated domain file that matches the domain URL for the universal link you made in your WeChat application.
- Format
-
https://example.com/.well-known/apple-app-site-association
This should be stored in your.well-known
directory.
-
Ensure your iOS application is also associated with the WeChat universal link domain in your
<app_name>.entitlements
file.<key>com.apple.developer.associated-domains</key> <array> <string>applinks:<DOMAIN_FROM_WECHAT></string> (1) </array>
1 Where DOMAIN_FROM_WECHAT
is your WeChat universal link without the scheme likeexample.com
.
Connect WeChat to ReachFive
To connect your WeChat web and/or mobile application to ReachFive:
-
Go to your WeChat web or mobile application.
-
Copy your App ID and App Secret.
If you don’t see it, you might need to generate the secret.
-
Go to the ReachFive Console.
-
Navigate to
. -
Click on WeChat.
-
Paste your App ID into the Client ID field and your App Secret into Client Secret field under Default if it’s a web application.
Configuring a mobile WeChat application?If you have a mobile application with WeChat, you need to add a variant:
-
Click the icon in the dialog.
-
Click the icon to edit the variant name.
-
The variant name must contain
android
for an Android app andios
for an iOS app. Variant names are case sensitive. -
If you are using the same WeChat application for iOS and Android, you can name it
android_and_ios
. This covers both mobile application types.
-
-
Paste your App ID into the Client ID field and your App Secret into Client Secret field.
-
iOS only For iOS apps, you must enter an iOS universal link.
-
-
Don’t forget to Save your input.
WeChat mini_program
A mini program does not follow the same flow as other Social Login providers.
-
Configure a variant with
mini_program
as part of the name in the WeChat connector in the ReachFive Console. -
Start the flow using the
wx.login
method, where you’ll receive acode
in the response. -
Using this
code
, call the ReachFive/oauth/provider/token
endpoint.