Seems to work, removing some debug code
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user