Skip to content

Instantly share code, notes, and snippets.

@laser
Created December 31, 2014 18:31
Show Gist options
  • Save laser/f3b5deff8e8d7b1bd022 to your computer and use it in GitHub Desktop.
Save laser/f3b5deff8e8d7b1bd022 to your computer and use it in GitHub Desktop.
k
function createAccount(email, password, done) {
var id = uuid();
async.waterfall([
function(callback) {
Services.Accounts.provision(email, password, callback);
},
function(accountId, callback) {
Services.Account.enable(email, accountId, callback);
}
],
function(err, auth) {
done(err, id, auth);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment