-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于SessionKey的问题 #11
Comments
你说的session id是指$session的代码逻辑里的id? 小程序没有 session 缓存,wxpage使用自己生成一个session_id通过localStorage来实现sessionStorage,这个id是内存级别的,只要小程序关闭重新启动了,id就会刷新,与标准的sessionStorage效果是一致的 |
通过wx.login获取的code,然后通过code换取的openid和sessionkey,请问这个sessionkey的有效期是什么?这个sessionkey只能解密当前用户还是通用的?您这边有没有现成的案例给我看看学习学习 |
可以这样理解 wx.checksession,如果checksession过期了,那么存储的第三方服务器的sessionKey是不是就过期了 |
具体时效逻辑由微信维护,对开发者透明。开发者只需要调用wx.checkSession接口检测当前用户登录态是否有效 |
调用wx.login, 上一次的sessionKey是肯定会失效的 |
那这样理解对吗?只要checksession不过期,那么存储在第三方的session_key 就不过期 |
checksession 是不是就是检测存储在第三方的session_key 啊 |
检查的是存储在微信登录服务的session_key,如果第三方存的session_key与微信的不一致,就是意味失效了 |
说白了,调用wx.login,然后后台请求API后 微信会存储的session_key 并返回给第三方存储的session_key,是吧 |
嗯,可以这样理解 |
The text was updated successfully, but these errors were encountered: