diff --git a/browserid/static/dialog/controllers/dialog_controller.js b/browserid/static/dialog/controllers/dialog_controller.js index 0721bd9e3e597c27055b5c9008e0848a3e745620..0fc31a0ca95020c6126946f8ee2fa39cf6f171df 100644 --- a/browserid/static/dialog/controllers/dialog_controller.js +++ b/browserid/static/dialog/controllers/dialog_controller.js @@ -128,10 +128,6 @@ PageController.extend("Dialog", {}, { }, doStart: function() { - // check to see if there's any pubkeys stored in the browser - var haveIDs = _.keys(getEmails()).length > 0; - var self = this; - // we should always check to see whether we're authenticated // at dialog start. issue #74. // diff --git a/browserid/static/js/browserid.js b/browserid/static/js/browserid.js index d32eda221ed4bc4b7a746c1ccd12a1db0e18bcb3..a8f11e5bbcf68e9d10ab19c4a5898b517fd5822a 100644 --- a/browserid/static/js/browserid.js +++ b/browserid/static/js/browserid.js @@ -43,11 +43,10 @@ var csrf = undefined; // execute a function with a csrf token, fetching it if required function withCSRF(cb) { if (csrf === undefined) { - $.get("/wsapi/csrf", function(result) { - alert(result); - csrf = result.body; + $.get("/wsapi/csrf", {}, function(result) { + csrf = result; cb(); - }); + }, 'html'); } else { setTimeout(cb, 0); }