¶ Access WeChat on Mobile
- Overview: PC WeChat scan code login allows users to safely log in to third-party applications or websites with WeChat identity. After WeChat scan code login is enabled in Authing, it can quickly obtain basic open information of WeChat users through Authing and help users realize basic open functions.
- Application scenarios: PC Website
- End-User Preview:
- If you do not have an account on the WeChat Open Platform (opens new window), please go to the WeChat Open Platform to register and log in.
- If you do not have an Authing Console account, please go to the Authing Console (opens new window) to register a developer account.
¶ Step 1: Create a website application on the WeChat open platform
Go to WeChat Open Platform (opens new window) and click Create an application. After the creation is complete, you need to record the
AppSecret of the application, which will be used later.
Please make sure that the app has obtained the permission to login with WeChat, and set the authorization callback domain to
¶ Step 2: Configure the WeChat website application in the Authing Console
2.1 On the "Social" page of the Authing Console, click the "Create Connection" button to enter the "Choosing a Social Identity Source" page.
2.2 On the "Choosing a Social Identity Source" page, click the "WeChat" card.
2.3 Continue to click the "WeChat QR Code on PC" login mode, or click "... Add".
2.4 On the "WeChat QR Code on PC" configuration page, fill in the relevant field information.
|a. The unique identifier consists of lowercase letters, numbers, and -, and the length is less than 32 digits.
b. This is the unique identifier of this connection and cannot be modified after setting.
|This name will be displayed on the button on the end user's login screen.
|WeChat application ID.
|WeChat application key.
|If you want to jump directly to the social identity provider for authentication without any Authing page in the middle, you can configure this parameter as the business callback address after successful authentication, and Authing will send the user's ID Token to this URL. 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 https://example.com/auth/callback. This parameter has nothing to do with the callback link in the application configuration.
|After enabling the "Login Only Mode", you can only log in to an existing account and cannot create a new account. Please choose carefully.
|Account Identity Association
|When "Account Identity Association" is not enabled, a new user is created by default when a user logs in through an identity provider. After enabling "Account Identity Association", you can allow users to directly log in to existing accounts through "Field Matching" or "Ask Binding Mode".
2.5 After the configuration is complete, click the "Create" or "Save" button to complete the creation.
¶ Step 3：Development access
Recommended development access method: Use a hosted login page
Description of advantages and disadvantages: The operation and maintenance are simple, and Authing is responsible for the operation and maintenance. Each user pool has an independent second-level domain name; if you need to embed it into your application, you need to use the pop-up mode to log in, that is: after clicking the login button, a window will pop up, the content is the login page hosted by Authing, or the browser The server redirects to the login page hosted by Authing.
Detailed access method:
3.1 Create an application in the Authing Console. For details, see: How to create an application in Authing
3.2 On the created "WeChat QR Code on PC" identity provider connection details page, open and associate an application created in the Authing Console
3.3 Click the "Experience Login" button of the app in the Authing Console, and experience the "WeChat QR Code on PC" login in the pop-up login window