diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-03-09 04:14:51 -0500 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2017-03-09 09:14:51 +0000 |
commit | bfc8dafe5eb03d6e4daa8fbc42f8361674474479 (patch) | |
tree | c6032002f08c5726bf97fd356fa8ed4be66296da /webapp | |
parent | 609a1148c73f6ddf52a1c3e54e20af88753e6d45 (diff) | |
download | chat-bfc8dafe5eb03d6e4daa8fbc42f8361674474479.tar.gz chat-bfc8dafe5eb03d6e4daa8fbc42f8361674474479.tar.bz2 chat-bfc8dafe5eb03d6e4daa8fbc42f8361674474479.zip |
Fix MFA page showing up when not active on account switch (#5687)
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/actions/user_actions.jsx | 2 | ||||
-rw-r--r-- | 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, ''); |