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.
function useSignInWithSms(): { signInWithSms: (options: SignInWithSmsOptions) => Promise<SignInWithSmsResult>; };
{ signInWithSms: (options: SignInWithSmsOptions) => Promise<SignInWithSmsResult>; }
signInWithSms()
options
SignInWithSmsOptions
Promise
SignInWithSmsResult
function SignInForm() { const [phoneNumber, setPhoneNumber] = useState(""); const [flowId, setFlowId] = useState(""); const { signInWithSms } = useSignInWithSms(); const handleSubmit = async (e) => { e.preventDefault(); try { const result = await signInWithSms({ phoneNumber }); setFlowId(result.flowId); } catch (error) { console.error("Failed to sign in:", error); } }; return ( <form onSubmit={handleSubmit}> <input type="tel" value={phoneNumber} onChange={(e) => setPhoneNumber(e.target.value)} placeholder="Enter your phone number" aria-label="Enter your phone number" /> <button type="submit">Sign In</button> </form> ); }
Was this page helpful?