These are the official introduction of the process, we have made it very detailed, and now briefly explain the process
A front end to a rear end passed through wx.login generating code, rear + appSecret + code to obtain a micro channel session_key & openid party server by submitting Appid (
GET https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=SECRET&js_code=JSCODE&grant_type=authorization_code
), We need to OpenID user is uniquely identified, this field can be added in the user table inside openid + user_id may then be stored in the cache, the generated key value to make a judgment token is returned to the front end user login state;