[Product Design] How to do a good job of "authorization" design for WeChat applets?

Authorized login reduces the operating cost of users when registering an account, and reduces the threshold for product acquisition. In this article, based on the case, the author takes stock of some issues that need to be paid attention to in the authorized login design of WeChat applets, and briefly analyzes the design ideas and principles behind the functional design

insert image description here

01 openID

In the WeChat ecosystem, in order to identify users, each Mini Program or Official Account generates a unique ID for each user, similar to an ID number, which has a unique verification attribute for the Mini Program or Official Account.

Store the openID, and when the user enters the applet next time, the user's identity can be identified and the login-free function can be realized. The applet itself has implemented the login function, so the development cost is reduced. However, obtaining openID is only applicable to products that do not include app and other platform applications in the plan. If you want to implement multiple applications, you must not use openID in the initial design! There is a big pit here, which will be introduced in detail later.

02 UnionID

If the developer has multiple mobile applications, website applications, and public accounts (including mini programs), UnionID can be used to distinguish the uniqueness of users, because as long as they are mobile applications, website applications, and public accounts under the same WeChat open platform account (including applets), the user's UnionID is unique.

In other words, the same user has the same UnionID for different applications under the same WeChat open platform. Note: It is necessary to bind multiple applications under the same subject on the WeChat open platform in order to realize the sharing of a UnionID by multiple applications. This configuration needs to be performed in advance.

03 Other user information

Including: user information, geographic location, positioning, mailing address, invoice title, obtaining invoice, and number of exercise steps.

04 WeChat binding mobile phone number

To obtain the default mobile phone number bound to the user's WeChat, the user needs to click the button on the page to call this function. The pop-up window supports the user to modify the mobile phone number. If the business needs to use the mobile phone number to register, you can use this function to obtain it. If it is not mandatory in the business, you only need to obtain the user's openID/UnionID, and obtain the mobile phone number when necessary to improve user experience.
After introducing the difference between openID/UnionID, summarize how to obtain these two IDs:

  • Click the button on the page, and the authorization pop-up window will pop up. The user agrees to the authorization before obtaining it. Note: The user's openID is placed in [User authorization to obtain nickname and avatar]. Extending a knowledge point, there is another way to obtain openID through the official login function provided by WeChat, but it may not be obtained when obtaining UnionID, so this method is not recommended.
  • If there is an official account with the same subject under the developer account, and the user has followed the official account. The system can directly obtain the user's openID/UnionID without requiring the user to authorize again.
  • If there is an official account or mobile application with the same subject under the developer account, and the user has authorized to log in to the official account or mobile application. Mini Program users do not need to authorize again.
  • After the user completes the payment in the mini program (not supported for mini games), the user's openID/UnionID can be obtained within 5 minutes without user authorization. This application scenario has not been used in the projects that the author participated in, but I feel that it should be used in similar products purchased by scanning codes.

For example, if you want to obtain the user's nickname, avatar and mobile phone number, you need to design two clicks on the button and pop up two authorization pop-up windows. One button click obtains one kind of authorization, and it can only be placed in different buttons . Design reference: Mini programs such as Meituan, Ruixing, and Keike.

05 Single sign-on process transformation cross-platform adaptation case

5.1 Background and flow chart of the old scheme

Our product is a distribution platform. At the time of initial planning and design, due to the cost of employment, we did not prepare to develop an app, but simply hoped to achieve operation and promotion through a small program. However, in the process of operation, the special business model is easy to violate the regulations, and I am afraid that the account will be blocked if there are too many reports from users. The high-level decision no longer relies on the WeChat ecosystem, thus tilting resources to independently develop apps. Therefore, the entire login process of the applet at that time needed to be upgraded to adapt to the app's multi-device registration and login.

The process of the old solution is as follows:
insert image description here
There are two places to step on the pit:

First, the concept of login has not been clarified with the R&D personnel. The R&D personnel believe that obtaining the user's openID is considered a successful login. For our business design, obtaining the user's mobile phone number is the real valid user.

Second, because the app was not planned at the beginning, the R&D personnel chose to obtain the user's openID when obtaining user information. When there are multiple mobile applications, the user's unionID cannot be obtained, and the user's data in each application cannot be connected.

However, during the transformation, there were already more than 300 authorized mobile phone number users, so the transformation plan took a long time to discuss and research, and finally came up with a relatively complete solution.

5.2 Scheme after transformation

In the APP, we have designed three login modes: WeChat authorized login, mobile phone number verification code login, and mobile phone number password login. The design of WeChat authorized login is relatively complicated. I only sorted out a simple process, and the ideas for research and development are output by the project manager.
Product design ideas:
insert image description here
R&D ideas:
insert image description here
During the design process, I encountered a misunderstanding in my thinking. The issues I considered at that time were as follows:

  • User A—login to the applet—acquired openID—binds mobile phone number 1—deemed as an old user
  • Old user A—use WeChat authorization to log in to the APP—obtain unionID—bind mobile phone number 2

What if the user logs in in the app and has a unionID, what should he do if he binds another mobile phone number? Is it time to create a new user? Then there is a situation where a unionid is bound to two mobile phone numbers.

How to handle this scenario?

The blind spot in this place is that I must associate openID with unionID, but it is not necessary. In this case, the mobile phone number can be regarded as two users as the unique identifier. Only when the same mobile phone number is bound, the data will be exchanged and merged. Create a new user, whose openID is empty, just get the unionID.

That is: user A is openID + mobile phone number 1, user B is unionID + mobile phone number 2 + openID is empty.

06 last

The fast and convenient R&D mode and iteration mode of Mini Programs can meet the needs of most Internet products for rapid iteration and quick trial and error, but there are many limitations in relying on the WeChat ecosystem. As a product manager of Mini Programs, you should be familiar with Mini Programs. The documents of the program and the official account are clear about what can and cannot be realized, so that when designing functions, you will not take too many detours, and you will also avoid conflicts with R&D students and design requirements that they cannot achieve.

Guess you like

Origin blog.csdn.net/qq_41661800/article/details/131807646