FIX: Persona login was not using promises
This commit is contained in:
parent
9ba25b2b61
commit
fea3f326a9
|
@ -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);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue