用 access_token 和 openid 就可以得到 token,code 却出现 Undefined index: openid

file

Code/larabbs2/routes/api.php
file

Code/larabbs2/app/Http/Requests/Api/SocialAuthorizationRequest.php
file
Code/larabbs2/app/Http/Controllers/Api/AuthorizationsController.php
file
file
配置正确:
file

file

access_token和openid填入后可以拿到token
file

code 却不行:
file

使用dd()方法
file
回到postman测试
file
file
file

重新获取code也是一样
file
file
file

请指教,提前说谢谢了!

《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
讨论数量: 2
liyu001989
  1. 确保 code 是刚生成的,因为只能用一次;
  2. 确保配置正确,没有缓存;
  3. 把 try catch 注释掉,打印 response,里面有错误原因。
5年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!