@benny_gebeya/gebeya-whatsapp-otp
Version:
React WhatsApp OTP verification component library with Supabase integration for phone number authentication
22 lines • 908 B
TypeScript
import { VerificationStep, WhatsAppOTPConfig, WhatsAppOTPCallbacks } from "../types";
export declare const useWhatsAppOTP: (config: WhatsAppOTPConfig, callbacks?: WhatsAppOTPCallbacks) => {
step: VerificationStep;
countryCode: string;
phoneNumber: string;
otpCode: string;
isLoading: boolean;
attemptsLeft: number;
maxAttemptsReached: boolean;
isSuspended: boolean;
suspensionMessage: string;
isModalOpen: boolean;
setCountryCode: import("react").Dispatch<import("react").SetStateAction<string>>;
setPhoneNumber: import("react").Dispatch<import("react").SetStateAction<string>>;
setOtpCode: import("react").Dispatch<import("react").SetStateAction<string>>;
sendOTP: () => Promise<void>;
verifyOTP: () => Promise<void>;
resetFlow: () => void;
openModal: () => void;
closeModal: () => void;
};
//# sourceMappingURL=useWhatsAppOTP.d.ts.map