I used the signup and login code from the hybrid friends app template. Seems to work fairly well, however after a new user registration, the first attempt to login with the new account fails. second and subsequent logins work fine. At first I thought the backend system wasn't creating the account fast enough, but that does not seem to be the issue. Has anyone else run into this? (Function below)
// Register user after required fields (username and password) are validated in Backend Services
var signup = function () {
Everlive.$.Users.register(
dataSource.Username,
dataSource.Password,
dataSource)
.then(function () {
app.showAlert('Please login now to begin using AppName.', 'Registration Complete');
app.mobileApp.navigate('#welcome');
},
function (err) {
app.showError(err.message);
});
};