However, if I use the syntax suggested in the documentation (http://devcenter.kinvey.com/ember/guides/users#signup) I get this error: "Assertion Failed: Kinvey.Error: user argument must contain: id and authtoken."
Seems like the difference is the use of "Kinvey.User" but I believe my initializer and adapter is working properly, since I see the user created in the Kinvey User database when I use the first approach.
Can you see if the network request is actually made when you try the second approach? It looks right, but something might be going wrong internally.
j
jgentes
said
over 6 years ago
Yes, in fact I just checked and the user actually gets created on in the Kinvey user store. Just getting that odd error.
Also I should have mentioned I'm using Ember-cli, which I'm guessing has something to do with it.
M
Mark
said
over 6 years ago
It might, I have not tried using the Ember-cli. How does your applications initializers look like?
j
jgentes
said
over 6 years ago
Actually I switched over to Angular. Too many challenges with Ember-cli, I think I need to wait for it to hit 1.0 and come back to it. Thx for your help.
jgentes
If I do this in my login controller, it works fine:
signup: function(username, password, email) {
var newuser = this.store.createRecord('user', {
username: username,
password: password,
email: email
});
var promise = newuser.save();
promise.then(function(user) {
console.log("Promise successful, returning user:");
console.log(user);
});
}
However, if I use the syntax suggested in the documentation (http://devcenter.kinvey.com/ember/guides/users#signup) I get this error: "Assertion Failed: Kinvey.Error: user argument must contain: id and authtoken."
Here's the code that fails:
signup: function(username, password, email) {
var promise = Kinvey.User.signup({
username: username,
password: password,
email: email
});
promise.then(function(user) {
console.log("Promise successful, returning user:");
console.log(user);
});
}
Seems like the difference is the use of "Kinvey.User" but I believe my initializer and adapter is working properly, since I see the user created in the Kinvey User database when I use the first approach.
Any ideas?