Do you really understand the principle of code scanning login?
2022-04-23 16:40:47 【Always--Learning】
Login by scanning QR code has become a common login method , This method can quickly log in without entering user name and password , It involves PC End 、 Interaction between mobile terminal and server terminal , Whether for front-end developers or back-end developers , Mastering the principle of code scanning login can help us design a set of login mechanism to serve our own applications .
The phase to be scanned is PC The process of interaction between client and server , It mainly includes the following steps ：
- PC The terminal carries its own device information , Send a request to the server to obtain QR code information .
- The server generates a unique QR code ID, And bind with this device .
- Service end-to-end PC End return QR code ID.
- PC According to the QR code ID Display QR code for mobile terminal scanning .
- PC Start a timer , Regularly poll the server , Query the status of QR code , Is it scanned , If it hasn't been scanned for a while , The QR code will fail .
This stage is mainly the interaction process between the mobile terminal and the server , It mainly includes the following steps ：
- Scan QR code at mobile terminal , Get QR code ID.
- The mobile terminal will its own identity information token, And send the scanned QR code information to the server .
- The server sends the QR code ID Bind with identity information , Generate temporary token.
- The server will temporarily token Back to the mobile . This temporary token Can be used as a credential to confirm login .
- PC The terminal will poll the status of the QR code , Update the status of QR code to be confirmed .
The confirmed stage mainly includes the following steps ：
- The mobile terminal carries temporary equipment token, Confirm login .
- The server receives a temporary message token after , After verification , The status of QR code will be changed to confirmed , Then generate PC End token.
- PC The terminal will poll the status of the QR code , And change to confirmed .
- Service end-to-end PC The terminal sends QR code status and PC End token.
- PC End by virtue PC End token Access server API.
- JMeter installation tutorial and solutions to the problems I encountered
- UWA Pipeline 功能详解｜可视化配置自动测试
- Server log analysis tool (identify, extract, merge, and count exception information)
- Execution plan calculation for different time types
- Custom implementation of Baidu image recognition (instead of aipocr)
- MySQL personal learning summary
- Use itextpdf to intercept the page to page of PDF document and divide it into pieces
Detailed explanation of UWA pipeline function ｜ visual configuration automatic test
Detailed explanation of file operation (2)
计组 | 【七 输入/输出系统】知识点与例题
英语 | Day15、16 x 句句真研每日一句（从句断开、修饰）
New project of OMNeT learning
- 如何建立 TikTok用户信任并拉动粉丝增长
- loggie 源码分析 source file 模块主干分析
- Dlib of face recognition framework
- NVIDIA graphics card driver error
- Installation and management procedures
- 5-minute NLP: text to text transfer transformer (T5) unified text to text task model
- Easyexcel reads the geographical location data in the excel table and sorts them according to Chinese pinyin
- MySQL master-slave synchronization pit avoidance version tutorial
- Construction of promtail + Loki + grafana log monitoring system
- Public variables of robotframework
- File upload and download of robot framework
- Selenium IDE and XPath installation of chrome plug-in
- Project framework of robot framework
- Use case execution of robot framework
- Use case labeling mechanism of robot framework
- Deepinv20 installation MariaDB
- Pycham connects to the remote server and realizes remote debugging
- DDT + Excel for interface test
- Pytorch: the pit between train mode and eval mode
- Introduction to how to set up LAN
- Loggie source code analysis source file module backbone analysis
- How to choose the wireless gooseneck anchor microphone and handheld microphone scheme
- How to build tiktok user trust and drive fan growth
- 【PIMF】OpenHarmony啃论文俱乐部—在ACM Survey闲逛是什么体验
- Kunteng full duplex digital wireless transceiver chip kt1605 / kt1606 / kt1607 / kt1608 is suitable for interphone scheme
- English | day15, 16 x sentence true research daily sentence (clause disconnection, modification)
- Knowledge points and examples of [seven input / output systems]
- How does flash cache data in memory?
- 博士申请 | 厦门大学信息学院郭诗辉老师团队招收全奖博士/博后/实习生
- ACL 2022 | DialogVED：用于对话回复生成的预训练隐变量编码-解码模型
- True math problems in 1959 college entrance examination
- MySQL master-slave replication