import * as React from 'react'; import { authService } from '../apps'; type MfaState = { isExternalIdentityProviderUser: boolean; isLoading: boolean; isMfaEnabled: boolean; loadingError?: Error; isSettingUpMfa: boolean; isDisablingMfa: boolean; setupError?: Error; mfaSetup?: Awaited>; }; export declare const MfaContext: React.Context void; cancelMfaSetup: () => void; completeMfaSetup: () => void; beginDisablingMfa: () => void; cancelDisablingMfa: () => void; completeDisablingMfa: () => void; clearMfaSetupError: () => void; loadMfa: () => void; }>; /** * React Component that provides the context for the * `useUserMeetsMfaRequirement()` hook and `` * component, to be used by components further down your component tree. **It * should only be included in your component tree once and ideally at the root * of the application.** * * #### Example * * ```js * import * as React from 'react' * import { * MfaProvider, * useUserMeetsMfaRequirement, * } from '@oneblink/apps-react' * * function Component() { * const { isLoading, userMeetsMfaRequirement } = * useUserMeetsMfaRequirement(true) * // use MFA Requirement details here * } * * function App() { * return ( * * * * ) * } * * const root = document.getElementById('root') * if (root) { * ReactDOM.render(, root) * } * ``` * * @param props * @returns * @group Components */ export declare function MfaProvider({ children, isExternalIdentityProviderUser, }: { children: React.ReactNode; isExternalIdentityProviderUser: boolean; }): import("react/jsx-runtime").JSX.Element; export default function useMfa(): MfaState & { beginMfaSetup: () => void; cancelMfaSetup: () => void; completeMfaSetup: () => void; beginDisablingMfa: () => void; cancelDisablingMfa: () => void; completeDisablingMfa: () => void; clearMfaSetupError: () => void; loadMfa: () => void; }; /** * React hook to check if the logged in user meets the MFA requirement of your * application. Will throw an Error if used outside of the `` * component. * * Example * * ```js * import { useUserMeetsMfaRequirement } from '@oneblink/apps-react' * * const isMfaRequired = true * * function Component() { * const userMeetsMfaRequirement = * useUserMeetsMfaRequirement(isMfaRequired) * } * ``` * * @returns * @group Hooks */ export declare function useUserMeetsMfaRequirement(isMfaRequired: boolean): boolean; export {};