MonikaChen
MonikaChen
  • 发布:2021-02-28 15:47
  • 更新:2021-03-01 11:36
  • 阅读:900

【报Bug】uniID.getUserInfoByToken没有返回userInfo字段

分类:uniCloud

产品分类: uniCloud/App

操作步骤:
const res = await uniID.getUserInfoByToken(event.uniIdToken)  
return res

预期结果:

校验成功应该返回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描述:

2021-02-28 15:47 负责人:无 分享
已邀请:
DCloud_uniCloud_WYQ

DCloud_uniCloud_WYQ

文档有误,这个api仅解析token内带的信息,不会查库,是不会返回userInfo的

  • MonikaChen (作者)

    了解,那这算文档bug,不算api的bug

    2021-03-01 13:03

  • MonikaChen (作者)

    而且getUserInfoByToken这个词组,让人望文生义就觉得应该有userInfo返回

    2021-03-01 13:05

该问题目前已经被锁定, 无法添加新回复