Privy uses
mailchecker to detect temporary email
domains. To block them automatically, turn the setting on in the Privy
Dashboard.To authenticate your users with a one-time passcode (OTP) sent to their email address, use the
useLoginWithEmail hook.To authenticate your users with Privy’s out of the box UIs, check out UI components here.
Email login with OTP
When a user signs in with email, Privy sends a one-time passcode (OTP) to the provided address.Enterprise customers can customize the OTP email used for login, including the sender reply address and email branding (such as logo). Contact us to enable this for your application.
Send Code
Parameters
Returns
Login with Code
Parameters
Returns
Usage
Tracking Flow State
Track the state of the OTP flow via thestate variable returned by the
useLoginWithEmail hook.The current state of the OTP flow.
Callbacks
You can optionally pass callbacks into theuseLoginWithEmail hook to run custom logic after a successful login or to handle errors that occur during the flow.onComplete
Parameters
onError
Parameters
Resources
React starter repo
Get started with React and Privy.
Next.js starter repo
Get started with Next.js and Privy.
Whitelabel starter repo
Get started with a whitelabel Privy integration.

