Once Mini Program is authorized, will he always maintain the authorized state?

it is very confusing to log in to Mini Program. I want to make a request to the backend to get token, when logging in. The login here is authorized login, that is, if you call getUserInfo, you can return iv,encryptedData and send it to the backend together with wx.login "s code. Is it reasonable to get token in this way? A single code of login can return token. If the user has authorized this Mini Program, will the authorization status be retained all the time, for example, when my token expires, do I need to redirect to the authorization page to get the iv,encryptedData? (because there seems to be a certain period of time to keep it in setStorage)


       StorageStorage Storagewx.login()

after the first login is successful, the backend returns a login logo, and then you store this logo locally, and all subsequent interfaces carry this logo. If the backend determines that your logo is invalid or expired, will it return a status? then you can jump to the login page according to the status code, and then you need to delete your local logo! Write again after the login is successful. As to when the backend will expire, it will be returned to you. You can negotiate


No, I may not get it next time

  • users change devices or delete Mini Program reentry
  • manually revoke authorization in settings
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b384ab-2c10e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b384ab-2c10e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?