accounts-frontend/packages/app/components/auth/deviceCode/DeviceCodeBody.tsx
ErickSkrauch be08857edc
Add E2E tests for device code grant flow.
Handle more errors for device code.
Dispatch a BSOD for an any unhandled exception from auth flow state
2024-12-18 01:02:02 +01:00

33 lines
936 B
TypeScript

import React from 'react';
import { FormattedMessage as Message } from 'react-intl';
import { Input } from 'app/components/ui/form';
import BaseAuthBody from 'app/components/auth/BaseAuthBody';
export default class DeviceCodeBody extends BaseAuthBody {
static displayName = 'DeviceCodeBody';
static panelId = 'deviceCode';
autoFocusField = 'user_code';
render() {
return (
<>
{this.renderErrors()}
<Message id="deviceCode" defaultMessage="Device Code">
{(nodes) => (
<Input
{...this.bindField('user_code')}
icon="key"
autoFocus
required
placeholder={nodes as string}
/>
)}
</Message>
</>
);
}
}