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.
This commit is contained in:
Tim Abbott 2019-06-06 17:02:50 -07:00
parent f5375adf8f
commit 3b502fa235
1 changed files with 2 additions and 2 deletions

View File

@ -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();
});