Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{ theme: theme },
_awsAmplify.I18n.get('Sign In Account')
),
_react2.default.createElement(
_AmplifyUI.SectionBody,
{ theme: theme },
_react2.default.createElement(_AmplifyUI.InputRow, {
autoFocus: true,
placeholder: _awsAmplify.I18n.get('Username'),
theme: theme,
key: 'username',
name: 'username',
onChange: this.handleInputChange
}),
_react2.default.createElement(_AmplifyUI.InputRow, {
placeholder: _awsAmplify.I18n.get('Password'),
theme: theme,
key: 'password',
type: 'password',
name: 'password',
onChange: this.handleInputChange
}),
_react2.default.createElement(
_AmplifyUI.ButtonRow,
{ theme: theme, onClick: this.signIn },
_awsAmplify.I18n.get('Sign In')
),
_react2.default.createElement(_FederatedSignIn.FederatedButtons, {
federated: federated,
theme: theme,
authState: authState,
onStateChange: onStateChange
value: function submitView() {
var theme = this.props.theme || _AmplifyTheme2.default;
return _react2.default.createElement(
'div',
null,
_react2.default.createElement(_AmplifyUI.InputRow, {
placeholder: _awsAmplify.I18n.get('Code'),
theme: theme,
key: 'code',
name: 'code',
autoComplete: 'off',
onChange: this.handleInputChange
}),
_react2.default.createElement(
_AmplifyUI.ButtonRow,
{ theme: theme, onClick: this.submit },
_awsAmplify.I18n.get('Submit')
)
);
}
}, {
function showSecretCode(code, theme) {
if (!code) return null;
return _react2['default'].createElement(
'div',
null,
_react2['default'].createElement(_qrcode2['default'], { value: code }),
_react2['default'].createElement(_AmplifyUI.InputRow, {
autoFocus: true,
placeholder: _awsAmplify.I18n.get('totp verification token'),
theme: theme,
key: 'totpCode',
name: 'totpCode',
onChange: this.handleInputChange
}),
_react2['default'].createElement(
_AmplifyUI.ButtonRow,
{ theme: theme, onClick: this.verifyTotpToken },
_awsAmplify.I18n.get('Verify')
)
);
}
}
return _react2.default.createElement(
_AmplifyUI.FormSection,
{ theme: theme },
_react2.default.createElement(
_AmplifyUI.SectionHeader,
{ theme: theme },
_awsAmplify.I18n.get('Confirm ' + this.state.mfaType + ' Code')
),
_react2.default.createElement(
_AmplifyUI.SectionBody,
{ theme: theme },
_react2.default.createElement(_AmplifyUI.InputRow, {
autoFocus: true,
placeholder: _awsAmplify.I18n.get('Code'),
theme: theme,
key: 'code',
name: 'code',
autoComplete: 'off',
onChange: this.handleInputChange
}),
_react2.default.createElement(
_AmplifyUI.ButtonRow,
{ theme: theme, onClick: this.confirm },
_awsAmplify.I18n.get('Confirm')
)
),
_react2.default.createElement(
_AmplifyUI.SectionFooter,
{ theme: theme },
_react2.default.createElement(
var _this4 = this;
var hide = this.props.hide;
if (hide && hide.includes(MFASetup)) {
return null;
}
var code = this.state.code;
return _react2['default'].createElement(
_AmplifyUI.FormSection,
{ theme: theme },
_react2['default'].createElement(
_AmplifyUI.SectionHeader,
{ theme: theme },
_awsAmplify.I18n.get('MFA Setup')
),
_react2['default'].createElement(
_AmplifyUI.SectionBody,
{ theme: theme },
this.showSecretCode(code),
_react2['default'].createElement(
_AmplifyUI.ButtonRow,
{ theme: theme, onClick: this.setup },
_awsAmplify.I18n.get('Get secret key')
),
_react2['default'].createElement(_AmplifyUI.InputRow, {
autoFocus: true,
placeholder: _awsAmplify.I18n.get('totp verification token'),
theme: theme,
key: 'totpCode',
name: 'totpCode',
var hide = this.props.hide;
var username = this.usernameFromAuthData();
if (hide && hide.includes(ConfirmSignUp)) {
return null;
}
return _react2.default.createElement(
_AmplifyUI.FormSection,
{ theme: theme },
_react2.default.createElement(
_AmplifyUI.SectionHeader,
{ theme: theme },
_awsAmplify.I18n.get('Confirm'),
' ',
_awsAmplify.I18n.get('Sign Up')
),
_react2.default.createElement(
_AmplifyUI.SectionBody,
{ theme: theme },
username ? _react2.default.createElement(
_AmplifyUI.MessageRow,
null,
username
) : _react2.default.createElement(_AmplifyUI.InputRow, {
placeholder: _awsAmplify.I18n.get('Username'),
theme: theme,
key: 'username',
name: 'username',
onChange: this.handleInputChange
null,
'less than 2 mfa types available'
)
);
}
var SMS = MFATypes.SMS,
TOTP = MFATypes.TOTP,
Optional = MFATypes.Optional;
return _react2.default.createElement(
_AmplifyUI.FormSection,
{ theme: theme },
_react2.default.createElement(
_AmplifyUI.SectionHeader,
{ theme: theme },
_awsAmplify.I18n.get('Select MFA Type')
),
_react2.default.createElement(
_AmplifyUI.SectionBody,
{ theme: theme },
_react2.default.createElement(
_AmplifyUI.MessageRow,
{ theme: theme },
_awsAmplify.I18n.get('Select your preferred MFA Type')
),
_react2.default.createElement(
'div',
null,
SMS ? _react2.default.createElement(_AmplifyUI.RadioRow, {
placeholder: _awsAmplify.I18n.get('SMS'),
theme: theme,
key: 'sms',
value: function render() {
var theme = this.props.theme ? this.props.theme : _AmplifyTheme2.default;
var code = this.state.code;
return _react2.default.createElement(
_AmplifyUI.FormSection,
{ theme: theme },
_react2.default.createElement(
_AmplifyUI.SectionHeader,
{ theme: theme },
_awsAmplify.I18n.get('TOTP Setup')
),
_react2.default.createElement(
_AmplifyUI.SectionBody,
{ theme: theme },
_react2.default.createElement(
_AmplifyUI.ButtonRow,
{ theme: theme, onClick: this.setup },
_awsAmplify.I18n.get('Get secret key')
),
this.showSecretCode(code, theme),
this.state.setupMessage ? _react2.default.createElement(
_AmplifyUI.MessageRow,
{ theme: theme },
_awsAmplify.I18n.get(this.state.setupMessage)
) : null
)
theme: theme,
key: 'noMFA',
name: 'MFAType',
value: 'NOMFA',
onChange: this.handleInputChange
}) : null,
_react2.default.createElement(
_AmplifyUI.ButtonRow,
{ theme: theme, onClick: this.verify },
_awsAmplify.I18n.get('Verify')
)
),
this.state.selectMessage ? _react2.default.createElement(
_AmplifyUI.MessageRow,
{ theme: theme },
_awsAmplify.I18n.get(this.state.selectMessage)
) : null
)
);
}
}, {
value: function showComponent(theme) {
var _this4 = this;
var hide = this.props.hide;
if (hide && hide.includes(RequireNewPassword)) {
return null;
}
return _react2.default.createElement(
_AmplifyUI.FormSection,
{ theme: theme },
_react2.default.createElement(
_AmplifyUI.SectionHeader,
{ theme: theme },
_awsAmplify.I18n.get('Change Password')
),
_react2.default.createElement(
_AmplifyUI.SectionBody,
null,
_react2.default.createElement(_AmplifyUI.InputRow, {
autoFocus: true,
placeholder: _awsAmplify.I18n.get('New Password'),
theme: theme,
key: 'password',
name: 'password',
type: 'password',
onChange: this.handleInputChange
}),
_react2.default.createElement(
_AmplifyUI.ButtonRow,
{ theme: theme, onClick: this.change },