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

invalid credential, access_token is invalid or not latest #808

Closed
libern opened this issue Jul 23, 2017 · 2 comments
Closed

invalid credential, access_token is invalid or not latest #808

libern opened this issue Jul 23, 2017 · 2 comments

Comments

@libern
Copy link

libern commented Jul 23, 2017

我用的环境

PHP 版本:7.0
overtrue/wechat 版本:3.1.10

问题及现象

下面的问题间接性的出现,

在获取用户信息的时候,

文件:/vendor/overtrue/laravel-wechat/src/Middleware/OAuthAuthenticate.php 59行的:

$this->wechat->oauth->user() 拿到的是空的,具体信息如下:

{"id":null,"name":null,"nickname":null,"avatar":null,"email":null,"original":{"errcode":40001,"errmsg":"invalid credential, access_token is invalid or not latest, hints: [ req_id: hDexla0781ns89 ]"},"token":{"access_token":"H-4ed0tSJ03IHptlfpZ5tzhAH-ILlqr7gZcWz2m3syX4KuIzqaDI0pY-UacFWvKqaFt5jRLjnqnyvWTChwl1IlRscEX8BaAW2fvG9A71eUM","expires_in":7200,"refresh_token":"fAxb7DdaYXuLhgRl_4_ZmjHlL9-v4AU3JrGe_1Q3XWGVTU552jIgbCAupnZBhCoSeWCWq2_JIma-Wsx9ReoTedoGoCtQiOkcWeOizFWU5g4","openid":"o9NpbxL6Z62jXxuaqW40amJNDiCY","scope":"snsapi_userinfo","unionid":"okGKHxH90KP0R36ZmevrjQrzOAIg"},"provider":"WeChat"}

描述你的问题现象,报错贴截图粘贴或者贴具体信息,提供必要的代码段

@motecshine
Copy link

errmsg 意思是 你的access_token是过期的,不可用的,看下你的代码是不是有哪些地方存在access_token 重复获取的逻辑。

@Array-Huang
Copy link

Array-Huang commented Apr 6, 2018

@motecshine @mingyoung 我也遇到了一样的问题;我纳闷的是,这access_token不是由easywechat自己管理的吗,还能够重复获取的?莫不是每new一个\EasyWeChat\Foundation\Application就重复获取了?

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