mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 16:24:55 +00:00
FIX: Persona login was not using promises
This commit is contained in:
parent
9ba25b2b61
commit
fea3f326a9
@ -6,14 +6,12 @@
|
|||||||
navigator.id.watch({
|
navigator.id.watch({
|
||||||
onlogin: function(assertion) {
|
onlogin: function(assertion) {
|
||||||
if (readyCalled) {
|
if (readyCalled) {
|
||||||
|
|
||||||
Discourse.ajax('/auth/persona/callback', {
|
Discourse.ajax('/auth/persona/callback', {
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: { 'assertion': assertion },
|
data: { 'assertion': assertion },
|
||||||
success: function(data, textStatus, jqXHR) {
|
|
||||||
Discourse.authenticationComplete(data);
|
|
||||||
},
|
|
||||||
dataType: 'json'
|
dataType: 'json'
|
||||||
|
}).then(function(data) {
|
||||||
|
Discourse.authenticationComplete(data);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user