meteor.js:Accounts.createUser奇怪的行为

时间:2014-01-10 14:07:14

标签: meteor

我正在尝试创建一个与{{loginButtons}}不同的授权系统 基本上不同的界面。

授权通过Google,Github和Facebook正常工作,但我不能通过电子邮件和密码注册用户。

基于这个this教程,我创建了函数:

Template.signup.events "submit #signup": (e, t) ->
 e.preventDefault()
 email = t.find('input[name="email"]').value
 password = t.find('input[name="password"]').value

 console.log(email)
 console.log(password)

 Accounts.createUser
   email: email
   password: password
 , (err) ->
   if err
     console.log(err)

   else
     console.log("Success!!!")

 false

但是在

  

meteor mongo

我明白这一点:

meteor:PRIMARY> db.users.find().pretty();
{ "_id" : "hS9QkjTAN38zqfCit" }

一切都是!!

还有其他一切吗?为什么只创建_id?!

我将非常感谢任何帮助( - :

1 个答案:

答案 0 :(得分:0)

抱歉!我的错误:我没有在

中返回用户对象
  

Accounts.onCreateUser

未定义服务时....