var ref = new Firebase("https://<YOUR-FIREBASE-APP>.firebaseio.com");
ref.createUser({ email: "not_a_real_user@new-domain-test-123.com", password: "correcthorsebatterystaple"}, function(error, userData) { if (error) { switch (error.code) { case "EMAIL_TAKEN": console.log("The new user account cannot be created because the email is already in use."); break; case "INVALID_EMAIL": console.log("The specified email is not a valid email."); break; default: console.log("Error creating user:", error); } } else { console.log("Successfully created user account with uid:", userData.uid); }});
How does this translate to EmberFire? Meaning, if I want to create a new user, I know I would simply do this:
var newUser = this.store.createRecord('user', {
user: this.get('user'),
password: this.get('password'),
timestamp: new Date().getTime()
});
newUser.save();
--
You received this message because you are subscribed to the Google Groups "Firebase + EmberJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-embe...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.