WeChat login is us Cool theme The theme Themer framework has a built-in function, through which users can directly log in and register through their microblog account, reducing the registration and login process. At present, the theme also supports WeChat public account login (mainly used for WeChat built-in browser on mobile end) and WeChat open platform login (Mainly used on the PC side). According to the rules of WeChat, the two platforms need to apply for independent authentication before they can use the corresponding WeChat login interface.
about WeChat public account login We have sorted out the tutorials before. Please refer to: Cool theme Topic WeChat login public account interface configuration tutorial, so next we will mainly introduce WeChat open platform Application for login interface.
Interface application
First go to WeChat open platform to register and log in, and complete Developer qualification
: Need enterprise qualification and pay 300 yuan certification fee 。
After passing the certification, enter Admin Center>Website Application
, click Create website app
, as shown in the figure:
Then fill in the form according to the requirements and upload the relevant registration form, which should be noted is the website information Authorization callback domain
, you only need to fill in the domain name, not the specific address and //
These prefixes.
After the application is completed, you will wait for the application to be approved.
Interface configuration
After the application is approved, click see
Enter the application details page and find AppID
and AppSecret
(If not, it can be reset and generated), as shown in the figure:
Then enter the website background Theme Settings>User Center>Social Login
add to WeChat open platform
The login method is as follows: AppID
and AppSecret
Fill in separately ID
and Key
Option.
WeChat login data synchronization
WeChat involves multiple login methods, such as Public account
Login Open platform
Login, and Applet
These different login methods are not interconnected by default, which will result in a new user being generated after the user logs in to the computer and then logs in using an applet, and the user data previously logged in cannot be synchronized. This can be done by WeChat open platform
Bind the public account and applet, as shown in the figure:
If you log in using the bound public account and applet, the system will return the same unionid by default to facilitate differentiation and realize the interworking between different ends of WeChat login.