【问题标题】:Feathersjs verify user via verifySignupShort pin codeFeathersjs 通过 verifySignupShort 密码验证用户
【发布时间】:2019-04-21 09:27:41
【问题描述】:

我正在使用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

【问题讨论】:

    标签: feathersjs feathers-authentication


    【解决方案1】:

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

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

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

    【讨论】:

    • 现在如果他们通过电话号码注册,应该如何获得 jwt? jwt 在验证响应或其他一些端点?
    猜你喜欢
    • 1970-01-01
    • 2015-08-21
    • 2014-07-26
    • 2016-01-21
    • 2018-11-08
    • 1970-01-01
    • 1970-01-01
    • 2019-07-03
    • 1970-01-01
    相关资源
    最近更新 更多