困扰我的一个问题,每次通过toOauth访问WeiXinOauthController或直接访问WeiXinOauthController都显示访问2次,以至于第2次无法获取openid,因为code只能用1次,第2次就获取不到accesstoken和oauth了,请问如何处理?
[ERROR]-[Thread: http-nio-8080-exec-7]-[com.jfinal.kit.LogKit.error()]: retry on 1 times but not matching v = {"errcode":40163,"errmsg":"code been used, hints: [ req_id: 4Kgc3a0768th19 ]"}
2017-12-04 01:22:48
[ERROR]-[Thread: http-nio-8080-exec-7]-[com.jfinal.kit.LogKit.error()]: retry on 2 times but not matching v = {"errcode":40163,"errmsg":"code been used, hints: [ req_id: 0768th21 ]"}
2017-12-04 01:22:48
[ERROR]-[Thread: http-nio-8080-exec-7]-[com.jfinal.kit.LogKit.error()]: retry on 3 times but not matching v = {"errcode":40163,"errmsg":"code been used, hints: [ req_id: PaF.uA0768th44 ]"}
2017-12-04 01:22:48
[INFO]-[Thread: http-nio-8080-exec-7]-[com.javen.weixin.controller.WeiXinOauthController.index()]: token:null
2017-12-04 01:22:48
[WARN]-[Thread: http-nio-8080-exec-7]-[com.javen.weixin.controller.WeiXinOauthController.index()]: getUserInfo:{"errcode":40001,"errmsg":"invalid credential, access_token is invalid or not latest, hints: [ req_id: xc0768s150 ]"}
单次调用是不会出现这种情况的,请检查下你的业务逻辑。
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
如果是使用的 weixin_guide 没有修改路由的情况下,通过toOauth
来通过授权获取用户信息那么菜单中的地址应该是http://域名[/项目名称]/toOauth
。回调地址填写 http://域名[/项目名称]/oauth
。
也许你点击了返回键 可以参考这个issues https://gitee.com/jfinal/jfinal-weixin/issues/I9XBU
登录 后才可以发表评论