UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

30 lines 1.74 kB
import { UseLoginReturn } from '@/utils/hooks'; import { TwoFactorAuthOtpType } from '@sage-bionetworks/synapse-types'; export type ONE_TIME_PASSWORD_STEP = 'VERIFICATION_CODE' | 'RECOVERY_CODE' | 'DISABLE_2FA_PROMPT'; export type OneTimePasswordFormProps = { step: ONE_TIME_PASSWORD_STEP; loginIsPending: boolean; onClickUseTOTP: () => void; onClickUseBackupCode: () => void; onSubmit: (code: string, otpType: TwoFactorAuthOtpType) => void; hideReset2FA?: boolean; onClickPromptReset2FA?: () => void; onClickReset2FA?: () => void; twoFactorAuthResetIsSuccess: UseLoginReturn['twoFactorAuthResetIsSuccess']; twoFactorAuthResetIsPending: UseLoginReturn['twoFactorAuthResetIsPending']; }; export declare const SHOW_RECOVERY_CODE_FORM_BUTTON_TEXT = "Use a backup code instead"; export declare const SHOW_TOTP_FORM_BUTTON_TEXT = "Use authenticator app instead"; export declare const BEGIN_RESET_2FA_BUTTON_TEXT = "Lost access to your codes?"; export declare const SEND_RESET_2FA_EMAIL_BUTTON_TEXT = "Send Instructions"; export declare const TWO_FACTOR_RESET_CONFIRMATION_TEXT = "Instructions to reset two-factor authentication were sent to the primary email address associated with your account."; /** * Component that allows the user to enter a one-time password second authentication factor, * such as a timed one-time password (TOTP) generated using a shared secret, or a single-use recovery code. * * The user may also use this UI to begin the process of disabling 2FA on their account. * @param props * @constructor */ export default function OneTimePasswordForm(props: OneTimePasswordFormProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=OneTimePasswordForm.d.ts.map