# WeChat Webpage Authorization
WeChat webpage authorized login provides online experience address: https://authing.cn/sample-wx.html (opens new window) (please open it in the WeChat client). And GitHub Demo source code: https://github.com/Authing/authing-wxmp-sdk (opens new window)
# Prerequisites
Before starting, make sure you have a Wechat Official Account (opens new window) that has passed WeChat authentication.
# Step
To connect to the WeChat webpage to authorize login, you need:
- Get WeChat service account configuration
- Configure WeChat Webpage Authorization application in Authing console
- Access WeChat webpage in hosting mode to authorize login
- Access WeChat webpage in manual mode to authorize login
# Create Wechat Service Account
You can get the Developer ID (AppID) and Developer Password (AppSecret) on the Development -> Basic Configuration page of the WeChat public platform background.
After that, you need to set Settings -> Official Account Settings -> Function Settings in the background of the WeChat public platform. The authorization scope name of the webpage is core.authing.cn
:
# Configure WeChat web authorization application in Authing console
For security verification considerations, the WeChat server needs to do a request verification with the Authing server. Developers need to download the txt file and record the file name and text content.
In the Authing console (Connect Identity Source-Social Login), find the WeChat Webpage Authorization application and fill in the development configuration of the WeChat service account.
App ID
App Secret
Callback URL
īŧThis is your business callback domain name, which is different from the callback link configured in the social login application. For example, your website domain name is https://example.com and the url for processing Authing callback requests is /auth/callback, then you should fill in ashttps://example.com/auth/callback
. If you need to configure the callback link separately in the application, the address here can be filled in: #.Txt Filename
: The txt file name used to verify the domain name.Txt Content
: The content of the txt file used to verify the domain name.
After configuration, please click "OK" to save the information.
# Next
After the configuration is complete, you can start to formally integrate social login into your system. Authing social login supports four access methods: using JavaScrit SDK, using Guard for Web login form component, using Authing online login page As with manually calling the social login interface, for the applicable scenarios and advantages and disadvantages of each method, please refer to: Social Login Access Guide.
â Wechat PC WechatWork QR Code â