From 87989b8afd4666a72940389db716b6500d0a9ec3 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Tue, 3 May 2016 14:10:36 -0400 Subject: PLT-2258 Unified login screen and related APIs (#2820) * Unified login screen and related APIs * Refactored login API call to be less convoluted * Removed LDAP login prompt from invite process * Fixed existing LDAP users being able to log in if LDAP was configured, but disabled * Gofmt * Future proofed login API * Updated login APIs based on feedback * Added additional auditing to login API * Actually removed loginById --- webapp/utils/web_client.jsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'webapp/utils/web_client.jsx') diff --git a/webapp/utils/web_client.jsx b/webapp/utils/web_client.jsx index a9851442b..3efb32806 100644 --- a/webapp/utils/web_client.jsx +++ b/webapp/utils/web_client.jsx @@ -39,14 +39,13 @@ class WebClientClass extends Client { // not sure why but super.login doesn't work if using an () => arrow functions. // I think this might be a webpack issue. - webLogin(email, username, password, token, success, error) { + webLogin(loginId, password, token, success, error) { this.login( - email, - username, + loginId, password, token, (data) => { - this.track('api', 'api_users_login_success', '', 'email', data.email); + this.track('api', 'api_users_login_success', '', 'login_id', loginId); BrowserStore.signalLogin(); if (success) { @@ -54,7 +53,7 @@ class WebClientClass extends Client { } }, (err) => { - this.track('api', 'api_users_login_fail', name, 'email', email); + this.track('api', 'api_users_login_fail', name, 'login_id', loginId); if (error) { error(err); } -- cgit v1.2.3-1-g7c22