From 3b502fa23504b361d3007346e213856f946430aa Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 6 Jun 2019 17:02:50 -0700 Subject: [PATCH] settings: Fix getting API key when using social auth. Long-term, we want this flow to do a full re-authentication, but this makes the frontend consistent with the backend and fixes a confusing bug where submitting the form ended up adding a weird `?password=` thing to the URL, in addition to not working. Fixes #12200. --- static/js/settings_account.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/settings_account.js b/static/js/settings_account.js index c5c779c6cc..9779bbff41 100644 --- a/static/js/settings_account.js +++ b/static/js/settings_account.js @@ -236,8 +236,8 @@ exports.set_up = function () { if (page_params.realm_password_auth_enabled !== false) { $("#get_api_key_box").show(); } else { - // Skip the password prompt step - $("#get_api_key_box form").submit(); + // Skip the password prompt step, since the user doesn't have one. + $("#get_api_key_button").click(); } $("#api_key_button_box").hide(); });