The problem of whether Mini Program login is good or bad.

the login of our project is to determine whether there is token in the localStorage when the user enters Mini Program. If not, the page prompts the authorization login = "call getUserInfo when you click the authorization login button =" the authorization pop-up window appears. If the user agrees to the authorization = "get the code with wx.login, send the code to the backend together with iv ev =" return the token at the backend = "store the token in the localStorage.

if the token fails later, the authorization page will reappear and click the authorization button to repeat the above steps, but sometimes the first login will fail and you will have to log in for the second time.

Apr.27,2022
Menu