UNPKG

@nibssplc/cams-sdk-react

Version:

React hooks and components for NIBSS CAMS SDK

25 lines (24 loc) 1.11 kB
import { type Credentials, MFAAuthenticatedResponse } from "@nibssplc/cams-sdk"; export declare const useOTPHandler: ({ email, appCode, instCode, MFAEndpoint, onAuthComplete, }: { email: string; appCode: string; instCode?: string; MFAEndpoint?: string; onAuthComplete: (state: boolean, data: MFAAuthenticatedResponse | null) => void; }) => { handleSubmitOTP: (authenticationValue: string) => Promise<boolean>; loading: boolean; setLoading: import("react").Dispatch<import("react").SetStateAction<boolean>>; attemptCount: number; isMaxAttemptsReached: boolean; resetAttempts: () => void; remainingAttempts: number; }; export declare const useCredentialsHandler: (onAuthComplete: (state: boolean, data: MFAAuthenticatedResponse | null) => void) => { handleSubmitCredentials: (CredentialsAuthEndpoint: string, credentials: Credentials) => Promise<boolean>; loading: boolean; setLoading: import("react").Dispatch<import("react").SetStateAction<boolean>>; attemptCount: number; isMaxAttemptsReached: boolean; remainingAttempts: number; };