How to set the 3rd_session validity period of Mini Program's login status?

for the following two points
1, Wechat will not inform developers of the validity period of session_key. We will renew session_key according to the behavior of users using Mini Program. The more frequently users use Mini Program, the longer the validity of session_key.
2. When implementing a custom login state, developers can consider the session_key validity period as the validity period of their login state.
I save the generated 3rd_session to redis, when the session_key expires and the 3rd_session in the redis expires, how do I set the validity period of the 3rd_session?

Mar.12,2021

the expiration time of session_key seems to be determined by the frequency of users. If users use it more frequently, the validity period will be longer. The expiration time can be judged by the front desk.


Mini Program uses openId and session_key to encrypt through jwt to generate custom login state 3rdSecretsessionjwt can set the aging parameter when encrypting, and check whether it expires every time request request

Menu