【发布时间】:2016-01-18 21:36:42
【问题描述】:
我有两个注册字段:
<input type="text" class="form-control" name="username" placeholder="Username">
<input type="text" class="form-control" name="password" placeholder="Password">
我想将名称属性更改为 usernameReg 和 passwordReg,以便我可以使用 Passport 进行注册。
Account.register(new Account({ username : req.body.username }), req.body.password, function(err, account)
我尝试将 req.body.username 更改为 req.body.usernameReg 和 req.body.password 更改为 req.body.passwordReg 但它不起作用,它给了我一个错误的请求错误(当然是在分别更改 HTML 中的名称属性之后)
Fiddle is here. - 不是完整的代码,只是为了便于突出显示。
【问题讨论】:
标签: javascript node.js express passport.js