Feathersjs 通过 verifySignupShort 密码验证用户

Feathersjs verify user via verifySignupShort pin code

我正在使用 feathersJS 进行概念验证,通过 phone 号码注册用户并通过短信和 pin 进行验证 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

根据文档,该值应该是一个带有 usertoken 的对象。 Token 也应该是一个字符串。

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

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