problem description
I read Mini Program"s wx.login and wx.checkSession , wx.login and then let the backend go to the interface provided by Tencent in exchange for session_key, and generate a sessionid to keep the login status. The current situation of
wx.checkSession is like this. Our project started on the web, and now we are going to migrate to Mini Program. This system has its own account password. In that case, can I not use wx.login , wx.checkSession . Is this reasonable (because I don"t use openid as my user ID)? My idea is that after the user logs in, the sessionid obtained from the server is saved to storage , and then used to set the header, but now I am faced with another problem. I can encapsulate wx.request and judge whether session is still valid, but if there is no maintenance of openid , it may require the user to re-log in. If you do not want the user to re-enter it, you may have to storage to save the account password and send it again? (is it not reasonable?)
has also had a reasonable idea to use wx.login in exchange for session , openid and our system account. After that, log in and directly use openid,
to solve this kind of problem. What is the better way to solve this kind of problem? I hope someone can give me some answers.
