Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Hook for verifying new accounts with verification codes
useVerifyNewAccount
import { useVerifyNewAccount } from "@getpara/react-sdk";
function VerificationFlow() { const { verifyNewAccount, verifyNewAccountAsync, isPending, error } = useVerifyNewAccount(); const [verificationCode, setVerificationCode] = useState(""); const [identifier, setIdentifier] = useState(""); // email or phone const handleVerification = async () => { try { const result = await verifyNewAccountAsync({ identifier, verificationCode }); console.log("Account verified successfully"); } catch (err) { console.error("Verification failed:", err); } }; return ( <div> <input type="text" value={identifier} onChange={(e) => setIdentifier(e.target.value)} placeholder="Email or phone used for signup" /> <input type="text" value={verificationCode} onChange={(e) => setVerificationCode(e.target.value)} placeholder="Enter verification code" maxLength={6} /> <button onClick={handleVerification} disabled={isPending || !verificationCode || !identifier} > {isPending ? "Verifying..." : "Verify Account"} </button> </div> ); }