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:
linkWallet
to link a walletlinkEmail
to link an emaillinkGoogle
to link a Google accountlinkTwitter
to link a Twitter accountlinkDiscord
to link a Discord accountlinkGithub
to link a Github accountlinkApple
to link an Apple accountlinkPhone
to link a phone number
Invoking these methods will open the Privy modal and guide the user through linking the desired account.

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:
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>
}
Due to issues with Twitter's mobile in-app browser, mobile users are currently unable to authenticate with their Twitter accounts on third-party sites. In kind, we strongly recommend that you do not call linkTwitter
for users accessing your site from a mobile device, as they will likely encounter an authentication error.
We are following this issue and will re-enable support for Twitter on mobile devices once the bug is resolved. Please see these issues on Twitter's Developer Forum [1, 2] for more information.