Login with Passkey
To authenticate your users with Privy’s out of the box UIs, check out UI components here.
loginWithPasskey from the useLoginWithPasskey hook to trigger the passkey login flow.Usage
Sign up with Passkey
UsesignupWithPasskey from the useSignupWithPasskey hook to trigger the passkey signup flow.Usage
Tracking Flow State
Track the state of the passkey flow via thestate variable returned by both the
useLoginWithPasskey and useSignupWithPasskey hooks.The current state of the passkey flow.
Callbacks
You can optionally pass callbacks into theuseLoginWithPasskey and useSignupWithPasskey hooks to run custom logic after a successful login or signup, or to handle errors that occur during the flow.onComplete
Parameters
The user object returned after successful login or signup.”
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.

