diff --git a/resources/static/dialog/controllers/is_this_your_computer.js b/resources/static/dialog/controllers/is_this_your_computer.js index dcdc35cd8ee93fbbfa57646381b7a590544a75a0..970c7bb9cc4664c64367d562b64793cc36e2a707 100644 --- a/resources/static/dialog/controllers/is_this_your_computer.js +++ b/resources/static/dialog/controllers/is_this_your_computer.js @@ -10,12 +10,15 @@ BrowserID.Modules.IsThisYourComputer = (function() { user = bid.User, network = bid.Network, storage = bid.Storage, - errors = bid.Errors; + errors = bid.Errors, + email; var Module = bid.Modules.PageModule.extend({ start: function(options) { options = options || {}; + email = options.email; + var self = this, complete = function(status) { options.ready && options.ready(status || false); @@ -31,11 +34,11 @@ BrowserID.Modules.IsThisYourComputer = (function() { yes: function() { storage.usersComputer.setConfirmed(network.userid()); - this.close("cancel_state"); + this.publish("email_chosen", { email: email }); }, no: function() { - this.close("cancel_state"); + this.publish("email_chosen", { email: email }); } }); diff --git a/resources/static/shared/network.js b/resources/static/shared/network.js index 2ec036d399ece564212906a64c63c66ab862fa00..5844d6c6efc4b487a4e17ff4940a4b127befc2d5 100644 --- a/resources/static/shared/network.js +++ b/resources/static/shared/network.js @@ -499,7 +499,7 @@ BrowserID.Network = (function() { data: { email: email, pubkey: pubkey.serialize(), - ephemeral: storage.usersComputer.confirmed(email) ? + ephemeral: !storage.usersComputer.confirmed(email) }, success: onComplete, error: onFailure