Preface Hello everyone, I am programmer Amu! When the web version of WeChat was first launched, countless people were amazed by its login method. There was no need to enter a username and password. Just open WeChat on your phone and scan to log in automatically. Log in by scanning QR code on WeChat Nowadays, as long as the application supports both PC and mobile terminals, it supports mobile app scanning code login, such as Taobao, 12306, etc. In principle, the QR code is just a piece of text encoding, so how does it achieve quick login? Today we will briefly analyze it! text If you scan the QR code with apps like WoChaCha, Alipay, or Sina Weibo, you will find that the QR code is parsed to the following URL: https://login.weixin.qq.com/l/obsbQ-Dzdg== Next, we will introduce each specific step of scanning code login in detail: WeChat scan code login principle As shown in the figure:
As for how the server notifies the web version of WeChat, there are only two ways: If it is a CS application, the client uses polling to ask the server whether the login is successful.
Scanning QR code to log in seems magical, mainly because WeChat APP will do some extra operations that ordinary QR code software will not do when scanning its own code, that is, submitting the currently logged in WeChat and the scanned ID to the WeChat server. Similar applications also have functions such as scanning code to pay and scanning code to add public accounts. Conclusion The above is the principle of scanning code to log in. Do you understand it? |
<<: Very down-to-earth! Android 10 gets new features
>>: Foreign media: Apple's 5G mobile phone release postponed to October due to the epidemic
Salt is one of the necessities for human producti...
Qutoutiao launched its product in June 2016, and ...
How much does it cost to produce the Yulin Textbo...
Produced by: Science Popularization China Author:...
From the day you were born, to babbling, to learn...
Chengdu tea tasting 181-8091-4220 (V synchronous)...
This article was first published by Hunzhi (WeCha...
Experts in this article: Liu Yuxuan, Tianjin Fore...
1. Structure and Architecture 1.1 Structure There...
How did you come up with the title ? Do you recei...
When the weather is hot, I can't help missing...
Investment and Financing Analyst Training Class (...
Cydia Substrate is a code modification platform. ...
Recently, the China Academy of Information and Co...
When autumn comes, the leaves in the parks and on...