accounts-frontend/packages/app/components/auth/mfa/MfaBody.tsx

44 lines
1.2 KiB
TypeScript
Raw Permalink Normal View History

2017-08-23 00:09:08 +05:30
import React from 'react';
import { defineMessages, FormattedMessage as Message } from 'react-intl';
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';
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;
2020-05-24 04:38:24 +05:30
autoFocusField = 'totp';
2020-05-24 04:38:24 +05:30
render() {
return (
<div>
{this.renderErrors()}
2020-05-24 04:38:24 +05:30
<PanelIcon icon="lock" />
2020-05-24 04:38:24 +05:30
<p className={styles.descriptionText}>
<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>
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
}