What is the difference between Mini Program login and authorization?
We can see from the official documentation of the Mini Program that the authorization operation requires wx. authorize() The interface is completed. The following is the description of the authorization operation in the document:
Initiate an authorization request to the user in advance. After the call is made, a pop-up window will immediately ask the user whether they agree to authorize the applet to use a certain function or obtain some of the user's data, but the corresponding interface will not actually be called. If the user has previously agreed to the authorization, no pop-up window will appear and success will be returned directly.
1. In other words, the authorization process actually only obtains the access permission to operate the wx interface on the front end of the mini program. This process will not actually have anything to do with the developer server.
2. Login is to let the developer server know who the current user is? In traditional web applications, we must ask users to enter their account number and password to log in. But in the WeChat application, we can complete this operation through the WeChat server and obtain the unique identifier (openId) corresponding to the current user.
Note: The openId of each user is unique to each WeChat application (official account or mini program), which means that a user will have different openIds to different WeChat applications
PHP Chinese website, a large number of free small program development tutorials, welcome to learn!
The above is the detailed content of What is the difference between mini program login and authorization?. For more information, please follow other related articles on the PHP Chinese website!