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 access token. #6

Open
ghost opened this issue Apr 3, 2019 · 0 comments
Open

Invalid access token. #6

ghost opened this issue Apr 3, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented Apr 3, 2019

我的用户组件使用的dektrium/yii2-user
当我配置好,扫码登录后提示

Exception – yii\base\Exception
Invalid access token.

如果我在Weixin中重写方法

    public function applyAccessTokenToRequest($request, $accessToken)
    {
       $data = $request->getData();
       $data['access_token'] = $accessToken->getToken();
        $data['openid'] = $accessToken->getParam('openid');
        $request->setData($data);
    }

就没有这个错误了,不知道我处理方法是否可取。

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

0 participants