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

20 lines 1.15 kB
import { PasswordResetSignedToken } from '@sage-bionetworks/synapse-types'; export declare const TWO_FACTOR_AUTH_CHANGE_PASSWORD_PROMPT = "Two-factor authentication is required to change your password. Your password has not yet been changed."; export type UseChangePasswordFormStateOptions = { hideReset2FA?: boolean; onChangePasswordSuccess?: () => void; }; /** * Hook that handles submitting a change password request and prompting the user for 2FA if necessary. * @param options */ export default function useChangePasswordFormState(options?: UseChangePasswordFormStateOptions): { successfullyChangedPassword: boolean; isPending: boolean; error: import("@sage-bionetworks/synapse-client").SynapseClientError | null; promptForTwoFactorAuth: boolean; TwoFactorAuthPrompt: () => import("react/jsx-runtime").JSX.Element; handleChangePasswordWithCurrentPassword: (username: string, currentPassword: string, newPassword: string) => void; handleChangePasswordWithResetToken: (newPassword: string, passwordChangeToken: PasswordResetSignedToken) => void; }; //# sourceMappingURL=useChangePasswordFormState.d.ts.map