2017-08-23 00:09:08 +05:30
|
|
|
import React from 'react';
|
2020-06-04 22:11:27 +05:30
|
|
|
import { defineMessages, FormattedMessage as Message } from 'react-intl';
|
2019-12-08 00:32:00 +05:30
|
|
|
import { PanelIcon } from 'app/components/ui/Panel';
|
|
|
|
import { Input } from 'app/components/ui/form';
|
|
|
|
import BaseAuthBody from 'app/components/auth/BaseAuthBody';
|
2017-08-23 00:09:08 +05:30
|
|
|
|
|
|
|
import styles from './mfa.scss';
|
2020-06-04 22:11:27 +05:30
|
|
|
|
|
|
|
const messages = defineMessages({
|
|
|
|
enterTotp: 'Enter code',
|
|
|
|
});
|
2017-08-23 00:09:08 +05:30
|
|
|
|
|
|
|
export default class MfaBody extends BaseAuthBody {
|
2020-05-24 04:38:24 +05:30
|
|
|
static panelId = 'mfa';
|
|
|
|
static hasGoBack = true;
|
2019-11-27 14:33:32 +05:30
|
|
|
|
2020-05-24 04:38:24 +05:30
|
|
|
autoFocusField = 'totp';
|
2019-11-27 14:33:32 +05:30
|
|
|
|
2020-05-24 04:38:24 +05:30
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
{this.renderErrors()}
|
2019-11-27 14:33:32 +05:30
|
|
|
|
2020-05-24 04:38:24 +05:30
|
|
|
<PanelIcon icon="lock" />
|
2019-11-27 14:33:32 +05:30
|
|
|
|
2020-05-24 04:38:24 +05:30
|
|
|
<p className={styles.descriptionText}>
|
2020-06-04 22:11:27 +05:30
|
|
|
<Message
|
|
|
|
key="description"
|
|
|
|
defaultMessage="In order to sign in this account, you need to enter a one-time password from mobile application"
|
|
|
|
/>
|
2020-05-24 04:38:24 +05:30
|
|
|
</p>
|
2019-11-27 14:33:32 +05:30
|
|
|
|
2020-05-24 04:38:24 +05:30
|
|
|
<Input
|
|
|
|
{...this.bindField('totp')}
|
|
|
|
icon="key"
|
|
|
|
required
|
|
|
|
placeholder={messages.enterTotp}
|
|
|
|
autoComplete="off"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
2017-08-23 00:09:08 +05:30
|
|
|
}
|