@dynamic-labs/sdk-react-core
Version:
A React SDK for implementing wallet web3 authentication and authorization to your website.
22 lines (21 loc) • 1.04 kB
TypeScript
import { MFADevice, MFADeviceType } from '@dynamic-labs/sdk-api-core';
export declare const useMfa: () => {
readonly addDevice: (type?: MFADeviceType) => Promise<{
id: string;
secret: string;
uri: string;
}>;
readonly authDevice: (code: string, type?: MFADeviceType, deviceId?: string) => Promise<boolean>;
readonly authRecoveryCode: (code: string) => Promise<boolean>;
readonly authenticateDevice: ({ code, type, deviceId, }: {
code: string;
type?: MFADeviceType;
deviceId?: string;
}) => Promise<string | undefined>;
readonly completeAcknowledgement: () => Promise<void>;
readonly deleteUserDevice: (deviceId: string, mfaAuthToken: string) => Promise<void>;
readonly getRecoveryCodes: (generateNewCodes?: boolean) => Promise<string[]>;
readonly getUserDevices: () => Promise<MFADevice[]>;
readonly updateUserDevice: (deviceId: string) => Promise<void>;
readonly verifyDevice: (code: string, type?: MFADeviceType) => Promise<MFADevice>;
};