Skip to content

Instantly share code, notes, and snippets.

@auggernaut
Created September 10, 2013 22:35
Show Gist options
  • Save auggernaut/6516737 to your computer and use it in GitHub Desktop.
Save auggernaut/6516737 to your computer and use it in GitHub Desktop.
GratziCosmos old login methods
var creds = { "user": $("#login-email").val(), "pass": $("#signin-password").val() };
var star;
var appname = Gratzi.Config.appName;
Gratzi.login(creds, function (err, res) {
if (res) {
console.log(res);
star = res.details.star;
Cosmos.login(creds, star, appname, function (err, res) {
if (res) {
console.log(res);
window.location.href = "#profile";
} else {
console.log(err);
$("#login-message").show().html(err.message);
}
});
} else {
console.log(err);
$("#login-message").show().html(err.message);
$("#login-message").addClass("text-error");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment