Skip to main content

Linking additional accounts

Developers can use Privy to prompt users to link additional accounts (such as a wallet or Discord profile) at any point in their user journey, not just during login.

This is part of our principle of progressive onboarding: improving conversion and delivering better UX by requiring users to complete onboarding steps (e.g. connecting a wallet) only when necessary.

You can prompt a user to link an additional account by using the following methods from the usePrivy hook:

Invoking these methods will open the Privy modal and guide the user through linking the desired account.

Sample prompt to link an email.

Sample prompt to link a user's email after they have logged in.

Below is an example button for prompting a user to link an email to their account:

Example Link Email Button
import { usePrivy } from '@privy-io/react-auth';

function Page() {
const { linkEmail } = usePrivy();
// You may replace this hook with any of the other `link-` hooks to
// link a different account type.
return <button onClick={linkEmail}>Link your email</button>
}
tip

Regardless of what login methods you've enabled for your app, you can always prompt a user to link any type of account using the respective link- call.