From bfc8dafe5eb03d6e4daa8fbc42f8361674474479 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Thu, 9 Mar 2017 04:14:51 -0500 Subject: Fix MFA page showing up when not active on account switch (#5687) --- webapp/actions/user_actions.jsx | 2 +- webapp/components/login/login_controller.jsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/actions/user_actions.jsx b/webapp/actions/user_actions.jsx index 0f6ac3e9f..b5f14577f 100644 --- a/webapp/actions/user_actions.jsx +++ b/webapp/actions/user_actions.jsx @@ -645,7 +645,7 @@ export function checkMfa(loginId, success, error) { loginId, (data) => { if (success) { - success(data); + success(data && data.mfa_required === 'true'); } }, (err) => { diff --git a/webapp/components/login/login_controller.jsx b/webapp/components/login/login_controller.jsx index 9bb8a4324..38c594cf7 100644 --- a/webapp/components/login/login_controller.jsx +++ b/webapp/components/login/login_controller.jsx @@ -131,8 +131,8 @@ export default class LoginController extends React.Component { checkMfa( loginId, - (data) => { - if (data && data.mfa_required === 'true') { + (requiresMfa) => { + if (requiresMfa) { this.setState({showMfa: true}); } else { this.submit(loginId, password, ''); -- cgit v1.2.3-1-g7c22