Official wechat process

  1. The front end gets a one-time code to pass to the server by calling wx.login()
  2. Code2Session interface is called to obtain the user’s unique identification of OpenID and session key session_key
  3. With sessionKey and encryptedData, IV decrypts the user’s unionID and phone number into the database
  4. After the authorized login succeeds, the token authentication is returned to our server