我几天来一直在努力解决这个问题,我可以创建一个用户,但我无法在用户节点下保存他们的电子邮件地址。
directory 1 RVA: 0x0 Size: 0
directory 2 RVA: 0xaf974 Size: 300
directory 3 RVA: 0xb8000 Size: 22328
directory 4 RVA: 0x0 Size: 0
directory 5 RVA: 0xc0800 Size: 6440
directory 6 RVA: 0xbe000 Size: 27776
directory 7 RVA: 0x91760 Size: 28
directory 8 RVA: 0x0 Size: 0
directory 9 RVA: 0x0 Size: 0
directory 10 RVA: 0x0 Size: 0
directory 11 RVA: 0xa46b8 Size: 64
directory 12 RVA: 0x0 Size: 0
directory 13 RVA: 0x91000 Size: 1736
directory 14 RVA: 0x0 Size: 0
directory 15 RVA: 0x0 Size: 0
directory 16 RVA: 0x0 Size: 0
答案 0 :(得分:1)
我看到以下几个问题:
结果代码将是这样的(不要忘记检查您的firebase规则):
register: function(user) {
return auth.$createUser({
email: user.email,
password: user.password
}, function(error) {
if (error) {
//catch possible errors
} else {
//no error, user has been created
//start with logging user in to have firebase write acces
auth.$authWithPassword({
email: user.email,
password: user.password
}, function(error, authData) {
if (error === null) {
//no error so log in succesfull
//Making the firebase reference
var ref = new Firebase(FIREBASE_URL).child("users");
//Get user id
var uid = authData.uid;
//Set data in firebase making a child using the user id
ref.child(uid).set({
key: regUser.uid, // ex: simplelogin:29
date: Firebase.ServerValue.TIMESTAMP,
email: user.email,
});
});
}
)};
}