Seems to work, removing some debug code

This commit is contained in:
Rick Falkvinge
2014-10-30 23:46:20 +01:00
parent f7402d4894
commit 31af30b1ee
2 changed files with 5 additions and 7 deletions
+2 -1
View File
@@ -18,7 +18,7 @@ namespace Swarmops.Security
protected void Page_Load(object sender, EventArgs e)
{
string nonce = Request.Params["Nonce"];
string identity = GuidCache.Get(nonce + "-Identity") as string;
string identity = (string) GuidCache.Get(nonce + "-Identity");
if (string.IsNullOrEmpty(identity))
{
@@ -27,6 +27,7 @@ namespace Swarmops.Security
else
{
GuidCache.Delete(nonce + "-Identity");
Persistence.Key["BitId_AuthComplete"] = DateTime.Now.ToString();
FormsAuthentication.RedirectFromLoginPage(identity, true);
}
}
+3 -6
View File
@@ -43,7 +43,6 @@
}); // end of document.ready
function recheckLogin() {
alertify.log("Checking");
$.ajax({
type: "POST",
url: "Login.aspx/TestLogin",
@@ -51,18 +50,16 @@
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
alertify.success("Success " + msg.d);
if (msg.d) {
alert("Successful login! Redirecting...");
document.location = "/";
alert("For great justice!!");
document.location = "/BitId.aspx?Nonce=" + bitIdNonce;
} else {
setTimeout(function () {
recheckLogin();
}, 1000);
}, 500);
}
},
error: function (msg) {
alertify.error("Error " + msg.d);
// we don't want the polling to die just because of a transient error
setTimeout(function () {
recheckLogin();