Skip to content
Snippets Groups Projects
Commit 9efac2a4 authored by Shane Tomlinson's avatar Shane Tomlinson
Browse files

Show error message on invalid authentication.

If an invalid authentication, onSuccess is not called, only onComplete.  Show the error message in onComplete.

close #222.
parent 56041316
No related branches found
No related tags found
No related merge requests found
/*jshint brgwser:true, jQuery: true, forin: true, laxbreak:true */
/*global Channel:true, CryptoStubs:true, alert:true, errorOut:true, setupChannel:true, getEmails:true, clearEmails: true, console: true, _: true, pollTimeout: true, addEmail: true, removeEmail:true, BrowserIDNetwork: true, BrowserIDWait:true, BrowserIDErrors: true, PageController: true */
/*jshint brgwser:true, jQuery: true, forin: true, laxbreak:true */
/*global Channel:true, CryptoStubs:true, alert:true, errorOut:true, setupChannel:true, getEmails:true, clearEmails: true, console: true, _: true, pollTimeout: true, addEmail: true, removeEmail:true, BrowserIDNetwork: true, BrowserIDWait:true, BrowserIDErrors: true, PageController: true */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
......@@ -52,7 +52,7 @@
"#forgotpassword click": function(event) {
this.close("authenticate:forgotpassword");
},
"#create click": function(event) {
this.close("authenticate:createuser");
},
......@@ -72,13 +72,13 @@
BrowserIDIdentities.authenticateAndSync(email, pass, function(authenticated) {
if (authenticated) {
self.doWait(BrowserIDWait.authentication);
} else {
self.find("#nosuchaccount").hide().fadeIn(400);
}
},
function(authenticated) {
if (authenticated) {
self.close("authenticate:authenticated");
} else {
self.find("#nosuchaccount").hide().fadeIn(400);
}
}, self.getErrorDialog(BrowserIDErrors.authentication));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment