search
HomeWeChat AppletMini Program DevelopmentThings to note when developing WeChat applet login and decryption modules

If the login decryption problem is not handled well during the development of WeChat Xiaocheng, an error will be reported when logging in. This article is a summary of the things developers should pay attention to when developing the login decryption module for WeChat public accounts. I am going to do this. Friends who are involved in development can learn more about it.

In the development of WeChat Mini Program, the login problem must be in this order

  1. The mini program requests login, gets the code and then passes it to the service end;

  2. The server gets the code and goes to the WeChat server to get the sessionKey;

  3. Then the applet calls the getuserinfo interface to get the encryptedData, iv, Then give it to the server;

  4. The server gets the client's encryptedData, vi and the previous sessionKey to decrypt to get user information such as unionId; otherwise, such problems will occur. This situation The reason for this accidental occurrence is that getuserinfo is called before the server gets the sessionKey. Sometimes it is faster than the server, and sometimes it is slower than the server, so there is an accident.

Related tutorials: WeChat Mini Program Video Tutorial

The above is the detailed content of Things to note when developing WeChat applet login and decryption modules. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:博客园. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.