From 3789a4613acd78df162601bda040075b20e92785 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Thu, 5 May 2016 23:07:59 -0400 Subject: Update MFA help text and fix some minor bugs (#2903) --- webapp/components/login/components/login_mfa.jsx | 2 +- webapp/components/login/login.jsx | 6 +-- .../user_settings/user_settings_security.jsx | 60 ++++++++++++---------- webapp/i18n/en.json | 4 +- 4 files changed, 38 insertions(+), 34 deletions(-) diff --git a/webapp/components/login/components/login_mfa.jsx b/webapp/components/login/components/login_mfa.jsx index f8d42012c..ce77c9fa9 100644 --- a/webapp/components/login/components/login_mfa.jsx +++ b/webapp/components/login/components/login_mfa.jsx @@ -21,7 +21,7 @@ export default class LoginMfa extends React.Component { e.preventDefault(); const state = {}; - const token = this.refs.token.value.trim(); + const token = this.refs.token.value.trim().replace(/\s/g, ''); if (!token) { state.serverError = Utils.localizeMessage('login_mfa.tokenReq', 'Please enter an MFA token'); this.setState(state); diff --git a/webapp/components/login/login.jsx b/webapp/components/login/login.jsx index ce200ad75..d2ee1be81 100644 --- a/webapp/components/login/login.jsx +++ b/webapp/components/login/login.jsx @@ -105,13 +105,12 @@ export default class Login extends React.Component { } submit(loginId, password, token) { - this.setState({showMfa: false, serverError: null}); - Client.webLogin( loginId, password, token, () => { + this.setState({serverError: null}); this.finishSignin(); }, (err) => { @@ -122,6 +121,7 @@ export default class Login extends React.Component { err.id === 'ent.ldap.do_login.user_not_registered.app_error' || err.id === 'ent.ldap.do_login.user_filtered.app_error') { this.setState({ + showMfa: false, serverError: ( - -
- + +
+ - - -
- +
+ +
+ +
); @@ -269,9 +273,9 @@ class SecurityTab extends React.Component { extraInfo = ( - ); diff --git a/webapp/i18n/en.json b/webapp/i18n/en.json index 63669d546..e3c1aac0f 100644 --- a/webapp/i18n/en.json +++ b/webapp/i18n/en.json @@ -1352,9 +1352,9 @@ "user.settings.import_theme.submitError": "Invalid format, please try copying and pasting in again.", "user.settings.languages.change": "Change interface language", "user.settings.mfa.add": "Add MFA to your account", - "user.settings.mfa.addHelp": "You can require a phone-based passcode, in addition to your password, to sign into Mattermost. To enable, download Google Authenticator to your iOS or Android phone, then click the Add MFA to your account button above and use Google Authenticator to scan the bar code that appears. Type in the Token generated by Google Authenticator and click Save. In future, you will be asked to enter a passcode from Google Authenticator in addition to your password on login.", + "user.settings.mfa.addHelp": "You can require a smartphone-based token, in addition to your password, to sign into Mattermost.

To enable, download Google Authenticator from iTunes or Google Play for your phone, then

1. Click the Add MFA to your account button above.
2. Use Google Authenticator to scan the QR code that appears.
3. Type in the Token generated by Google Authenticator and click Save.

When logging in, you will be asked to enter a token from Google Authenticator in addition to your regular credentials.", "user.settings.mfa.addHelpQr": "Please scan the bar code with the Google Authenticator app on your smartphone and fill in the token with one provided by the app.", - "user.settings.mfa.enterToken": "Token", + "user.settings.mfa.enterToken": "Token (numbers only)", "user.settings.mfa.qrCode": "Bar Code", "user.settings.mfa.remove": "Remove MFA from your account", "user.settings.mfa.removeHelp": "Removing multi-factor authentication means you will no longer require a phone-based passcode to sign-in to your account.", -- cgit v1.2.3-1-g7c22