Created
September 10, 2013 22:35
-
-
Save auggernaut/6516737 to your computer and use it in GitHub Desktop.
GratziCosmos old login methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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