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

[bug] 微信公众号oauth为snsapi_base getRaw返回为空 #2840

Open
153264 opened this issue Sep 27, 2024 · 3 comments
Open

[bug] 微信公众号oauth为snsapi_base getRaw返回为空 #2840

153264 opened this issue Sep 27, 2024 · 3 comments

Comments

@153264
Copy link
Contributor

153264 commented Sep 27, 2024

我用的环境

  • PHP 版本:8.2
  • overtrue/wechat 版本:6.12
  • 是否使用了框架?框架名称:thinkphp6

问题及现象

微信公众号oauth授权登陆使用scopessnsapi_base
getRaw返回为空

$oauth = $app->getOAuth()->scopes(['snsapi_base']);

$user = $oauth->userFromCode($code);
dump($user);
dump($user->getRaw());

image

@153264
Copy link
Contributor Author

153264 commented Sep 27, 2024

应该是这里没调用setRaw
image

@153264
Copy link
Contributor Author

153264 commented Sep 27, 2024

目前临时这样处理了,不确定是否要像下面一样去setRefreshTokensetExpiresInsetTokenResponse
image

@153264
Copy link
Contributor Author

153264 commented Sep 27, 2024

overtrue/socialite#281

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

1 participant