krotnotes.blogg.se

Principle mac app
Principle mac app












  1. #Principle mac app verification
  2. #Principle mac app Pc

#Principle mac app verification

Website verification login succeeded: in step 1, the QR code login page starts a polling of code scanning status. After the website API confirms that the user’s token is valid, it updates the status of the QR code ID created in step 1 to “confirm login”, and binds the current user at the same time.ģ. After the user clicks the confirm or agree button, App submits the QR code information together with the current user’s token to the website API. This page can be the native page of the app or the remote H5 page. Then the app extracts the login information in the QR code and displays the login confirmation page.

principle mac app

User scanning code to confirm login: the user opens the mobile app and scans the QR code displayed in the browser by using the code scanning function of the app. After all, it doesn’t matter if the communication is slightly delayed at this time.Ģ. Although the response of websocket is relatively timely, considering the compatibility and complexity, most schemes will still choose polling or long polling. Some articles say that websocket can be used here. The so-called polling is that the browser calls the API of the website every few seconds to query the code scanning login results of the QR code, and the identification of the QR code is carried during the query. The user initiates QR code login: at this time, the website will generate a QR code and save the corresponding logo of the QR code to track the scanning status of the QR code, and then return the QR code page to the browser The browser first displays the QR code, and then initiates the polling of code scanning status according to the instructions of JavaScript script. Let’s take a look at the operation principle of this login method:Īs shown in the figure above, the whole process is relatively simple, which is roughly divided into the following steps:ġ.

#Principle mac app Pc

Wechat, microblog, Zhihu and so on are all representatives of this product form.įor ease of introduction, let’s assume that the PC application is a web site. In this example, mobile app and PC app belong to the same product, which is a common product form. Users scan the code with mobile app and confirm login, and then users can log in successfully on PC. In order to facilitate users to log in on PC, the product provides a code scanning login function, that is, a login QR code is displayed on PC application. Suppose there is a product that provides services to users through mobile app and PC application. This article will take a look at how this synchronization occurs. In this form, code scanning login is to synchronize the user’s login status in the mobile app to the website.

principle mac app

After the website detects that the user confirms the login, it jumps to the login success page. The user opens the corresponding mobile app, scans the QR code displayed on the website, and then confirms the login in the app. When a user needs to log in to a website, the website will provide a code scanning login method.

principle mac app

Now code scanning login is a very common login method.














Principle mac app