Skip to content
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

微信网页授权重复请求报code无效 #714

Closed
awesee opened this issue May 26, 2017 · 3 comments
Closed

微信网页授权重复请求报code无效 #714

awesee opened this issue May 26, 2017 · 3 comments

Comments

@awesee
Copy link

awesee commented May 26, 2017

我用的环境

PHP 版本:5.6.30
overtrue/wechat 版本:3.2.7

问题及现象

微信网页授权,如果授权成功后用户点击返回按钮,会报“40029 不合法的oauth_code 错误”,因为code只能用一次,怎么在code无效时自动重新授权,而不是报错。用set_exception_handler不太合适,改源码就更不好了。

20170526122416

@overtrue
Copy link
Collaborator

我在文档上说过啊,授权完成后要用 301 跳转到业务页面而不是直接显示页面

@awesee
Copy link
Author

awesee commented May 26, 2017

跳转到业务页面了,是正常的,问题在于在业务页面用户点击返回,就到了那个有code参数的链接,就会报code无效。安卓手机更容易出现这个错误。
201705261325089

@reason211
Copy link

history.replaceState

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants