Skip to content

Conversation

afubao
Copy link

@afubao afubao commented Aug 18, 2025

fix: resolve "Undefined array key 'openid'" error in wechat oauth snsapi_base scope

微信静默授权登录的时候,如果非正常响应的时候,会报错Undefined array key "openid",原因是getSnsapiBaseUserFromCode函数中的$token实际上是{"errcode":40029,"errmsg":"invalid code, rid: xxxxx"},本次修改是将两种授权都走tokenFromCode函数,内部会调用normalizeAccessTokenResponse进行错误拦截

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

Successfully merging this pull request may close these issues.

1 participant