FIX: Persona login was not using promises

This commit is contained in:
Robin Ward 2013-05-31 13:16:14 -04:00
parent 9ba25b2b61
commit fea3f326a9
1 changed files with 2 additions and 4 deletions

View File

@ -6,14 +6,12 @@
navigator.id.watch({
onlogin: function(assertion) {
if (readyCalled) {
Discourse.ajax('/auth/persona/callback', {
type: 'POST',
data: { 'assertion': assertion },
success: function(data, textStatus, jqXHR) {
Discourse.authenticationComplete(data);
},
dataType: 'json'
}).then(function(data) {
Discourse.authenticationComplete(data);
});
}
},