const res = await uniID.getUserInfoByToken(event.uniIdToken)
return res
MonikaChen
- 发布:2021-02-28 15:47
- 更新:2021-03-01 11:36
- 阅读:900
产品分类: uniCloud/App
操作步骤:
预期结果:
校验成功应该返回userInfo字段
校验成功应该返回userInfo字段
实际结果:
前端得到的是:
{
"success": true,
"header": {
"x-fc-invocation-service-version": "LATEST",
"x-serverless-runtime-version": "1.1.1",
"date": "Sun, 28 Feb 2021 07:40:28 GMT",
"x-serverless-cold-boot": "true",
"x-fc-invocation-duration": "68",
"x-fc-code-checksum": "xxxxxx",
"access-control-expose-headers": "Date,x-fc-request-id,x-fc-error-type,x-fc-code-checksum,x-fc-invocation-duration,x-fc-max-memory-usage,x-fc-log-result,x-fc-invocation-code-version",
"content-disposition": "attachment",
"x-serverless-request-id": "xxx",
"content-length": "132",
"x-fc-request-id": "xxx",
"x-fc-max-memory-usage": "35.48",
"content-type": "application/json"
},
"result": {
"uid": "xxxxxx",
"role": [],
"permission": [],
"clientId": "xxxxxx"
},
"requestId": "xxxx"
}
返回了正确的uid,但没有userInfo
前端得到的是:
{
"success": true,
"header": {
"x-fc-invocation-service-version": "LATEST",
"x-serverless-runtime-version": "1.1.1",
"date": "Sun, 28 Feb 2021 07:40:28 GMT",
"x-serverless-cold-boot": "true",
"x-fc-invocation-duration": "68",
"x-fc-code-checksum": "xxxxxx",
"access-control-expose-headers": "Date,x-fc-request-id,x-fc-error-type,x-fc-code-checksum,x-fc-invocation-duration,x-fc-max-memory-usage,x-fc-log-result,x-fc-invocation-code-version",
"content-disposition": "attachment",
"x-serverless-request-id": "xxx",
"content-length": "132",
"x-fc-request-id": "xxx",
"x-fc-max-memory-usage": "35.48",
"content-type": "application/json"
},
"result": {
"uid": "xxxxxx",
"role": [],
"permission": [],
"clientId": "xxxxxx"
},
"requestId": "xxxx"
}
返回了正确的uid,但没有userInfo
bug描述:
uni-id版本3.0.5
token正确并且有效,但是uniID.getUserInfoByToken没有返回userInfo字段
文档:https://uniapp.dcloud.io/uniCloud/uni-id?id=%e6%a0%b9%e6%8d%aetoken%e8%8e%b7%e5%8f%96%e7%94%a8%e6%88%b7%e4%bf%a1%e6%81%af
MonikaChen (作者)
了解,那这算文档bug,不算api的bug
2021-03-01 13:03
MonikaChen (作者)
而且getUserInfoByToken这个词组,让人望文生义就觉得应该有userInfo返回
2021-03-01 13:05