diff --git a/package-lock.json b/package-lock.json index d4a8daa..e7a254d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ely-by-account", - "version": "1.1.19-dev", + "version": "1.1.21-dev", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -3714,9 +3714,9 @@ "dev": true }, "flow-bin": { - "version": "0.47.0", - "resolved": "https://registry.npmjs.org/flow-bin/-/flow-bin-0.47.0.tgz", - "integrity": "sha1-oqCKs+DR8ctX0X4nswsRi2L9o2c=", + "version": "0.51.1", + "resolved": "https://registry.npmjs.org/flow-bin/-/flow-bin-0.51.1.tgz", + "integrity": "sha1-eSnG8KlOdlQp/LLubkaCePqpxzI=", "dev": true }, "fontgen-loader": { diff --git a/package.json b/package.json index cc0478d..2212d32 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "exports-loader": "^0.6.3", "extract-text-webpack-plugin": "^1.0.0", "file-loader": "^0.11.0", - "flow-bin": "^0.47.0", + "flow-bin": "^0.51.1", "fontgen-loader": "^0.2.1", "html-loader": "^0.4.3", "html-webpack-plugin": "^2.0.0", diff --git a/src/components/profile/multiFactorAuth/MultiFactorAuth.intl.json b/src/components/profile/multiFactorAuth/MultiFactorAuth.intl.json index 8d6107c..9008bb3 100644 --- a/src/components/profile/multiFactorAuth/MultiFactorAuth.intl.json +++ b/src/components/profile/multiFactorAuth/MultiFactorAuth.intl.json @@ -7,7 +7,7 @@ "getAlternativeApps": "Get alternative apps", "theAppIsInstalled": "The app is installed", - "scanQrCode": "Open your favorit QR scanner app and scan the following QR code:", + "scanQrCode": "Open your favorite QR scanner app and scan the following QR code:", "or": "OR", "enterKeyManually": "If you can't scan QR code, then enter the secret key manually:", "whenKeyEntered": "Go to the next step, after you will see temporary code in your two-factor auth app.", diff --git a/src/components/profile/multiFactorAuth/MultiFactorAuth.js b/src/components/profile/multiFactorAuth/MultiFactorAuth.js index 2989984..f971217 100644 --- a/src/components/profile/multiFactorAuth/MultiFactorAuth.js +++ b/src/components/profile/multiFactorAuth/MultiFactorAuth.js @@ -10,6 +10,7 @@ import styles from 'components/profile/profileForm.scss'; import helpLinks from 'components/auth/helpLinks.scss'; import Stepper from 'components/ui/stepper'; import { ScrollMotion } from 'components/ui/motion'; +import mfa from 'services/api/mfa'; import Instructions from './instructions'; import KeyForm from './keyForm'; @@ -39,11 +40,17 @@ export default class MultiFactorAuth extends Component { }; state: { + isLoading: bool, activeStep: number, + secret: string, + qrCodeSrc: string, code: string, newEmail: ?string } = { + isLoading: false, activeStep: this.props.step, + qrCodeSrc: '', + secret: '', code: this.props.code || '', newEmail: null }; @@ -56,7 +63,7 @@ export default class MultiFactorAuth extends Component { } render() { - const {activeStep} = this.state; + const {activeStep, isLoading} = this.state; const form = this.props.stepForm; const stepsData = [ @@ -76,6 +83,7 @@ export default class MultiFactorAuth extends Component { return (