First, configure the callback domain of the WeChat official account, and use the Appkey and secrect of the official account in the project.
If the outbound scan login is successful, it will jump to the callback method, which will give you a code so that you can obtain WeChat user information
View WeChat web development documentation for details