import { CreateMfaToken, MFADevice, MFADeviceType, TokenScope } from '@dynamic-labs/sdk-api-core'; type UseMfaHookResult = { /** * Add a new device to the user's account. */ addDevice: (type?: MFADeviceType) => Promise<{ id: string; secret: string; uri: string; }>; /** * @deprecated Use authenticateDevice instead. * This function authenticates a device and returns a boolean value * indicating if the authentication was successful. */ authDevice: (code: string, type?: MFADeviceType, deviceId?: string) => Promise; /** * @deprecated use authenticateRecoveryCode instead */ authRecoveryCode: (code: string) => Promise; /** * Authenticates a recovery code and returns a single use MFA token * if the authentication is successful and createMfaToken param is provided. */ authenticateRecoveryCode: ({ code, createMfaToken, requestedScopes, }: { code: string; createMfaToken?: CreateMfaToken; requestedScopes?: TokenScope[]; }) => Promise; /** * Authenticates a device and returns a single use MFA token * if the authentication is successful and createMfaToken param is provided. */ authenticateDevice: ({ code, type, deviceId, createMfaToken, requestedScopes, }: { code: string; type?: MFADeviceType; deviceId?: string; createMfaToken?: CreateMfaToken; requestedScopes?: TokenScope[]; }) => Promise; completeAcknowledgement: () => Promise; /** * Delete a user's device */ deleteUserDevice: (deviceId: string, mfaAuthToken: string) => Promise; /** * Get the current recovery codes for this user. * * Note: This will throw an error if the user has already acknowledged their recovery codes. * In this scenario, you should use getNewRecoveryCodes instead. */ getRecoveryCodes: ( /** * @deprecated use getNewRecoveryCodes instead */ generateNewCodes?: boolean) => Promise; /** * Get the user's devices */ getUserDevices: () => Promise; updateUserDevice: (deviceId: string) => Promise; /** * @deprecated use authenticateDevice instead */ verifyDevice: (code: string, type?: MFADeviceType) => Promise; /** * Get new recovery codes for this user. * The user will need to acknowledge the new recovery codes. */ getNewRecoveryCodes: () => Promise; /** * Check if the user has already acknowledged their recovery codes. * * Once the user has acknowledged their recovery codes, the recovery codes will no * longer be accessible via getRecoveryCodes. */ isPendingRecoveryCodesAcknowledgment: () => Promise; }; export declare const useMfa: () => UseMfaHookResult; export {};