使用微信公众号静默授权时,未验证微信返回的异常情况,业务代码如下: ... $oauth = $wechatOfficeApp->getOauth()->scopes(['snsapi_base']); $user = $oauth->userFromCode($code); easywechat 的授权逻辑: vendor/overtrue/socialite/src/Providers/WeChat.php: <img width="1120" height="314" alt="Image" src="https://github.com/user-attachments/assets/973f167b-8c0f-4a54-a043-77b0edf875f2" /> 此处在使用请求微信返回的数据时,没有验证数据是否正常。如 使用一个已使用的code,会报错 Undefined array key \"openid\,而无法获取微信返回的异常说明。