0

我正在使用feathersJS进行概念验证,以通过电话号码注册用户并通过短信和密码进行验证https://github.com/morenoh149/feathers-chat-phone-signup-sms

目前我收到以下错误

$ sh curls/user-verify.sh 118903
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   208  100   156  100    52  17067   5689 --:--:-- --:--:-- --:--:-- 17333
{
  "name": "BadRequest",
  "message": "Expected string value. (authManagement)",
  "code": 400,
  "className": "bad-request",
  "data": {},
  "errors": {
    "$className": "badParams"
  }
}

该 api 正在使用https://github.com/feathers-plus/feathers-authentication-management并且我已尽力使其适应此用例。我的卷发看起来像

curl --header "Content-Type: application/json" \
  --data '{ "action": "verifySignupShort", "value": 12345 }' \
http://localhost:3030/authmanagement
4

1 回答 1

0

根据文档该值应该是一个带有user和的对象token。令牌也应该是一个字符串。

{
    "action": "verifySignupShort",
    "value": {
        "token": "390494",
        "user": {
            "phoneNumber": "5005550006"
        }
    }
}

文档:https ://github.com/feathers-plus/feathers-authentication-management/blob/master/docs.md

于 2019-04-10T13:40:41.950 回答