From fea3f326a9f543341875214996629757074a37f3 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 31 May 2013 13:16:14 -0400 Subject: [PATCH] FIX: Persona login was not using promises --- app/views/common/_persona_javascript.html.erb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/views/common/_persona_javascript.html.erb b/app/views/common/_persona_javascript.html.erb index 718ca3a778a39..56ec02425743c 100644 --- a/app/views/common/_persona_javascript.html.erb +++ b/app/views/common/_persona_javascript.html.erb @@ -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); }); } },