Allow your users to link their external accounts with their Para account
After your users sign in, they can view their connected wallets (embedded or external) from the Para Modal’s Profile screen. They will also be able to link addtional third-party accounts or browser wallets through the provided user interface. Linking an account simply requires the user to complete the same steps as for a traditional signup. Depending on the account type, they will be prompted to enter a verification code, complete a third-party signup in a popup, or sign a message with their external wallet.
To trigger the account linking flow programmatically, you can use the useLinkAccount
hook. This will open the Para Modal directly to the account linking interface, and allow you to pre-populate the type and identifier if you choose.
Afterward, you will be able to fetch the linked accounts for the signed-in user via the getLinkedAccounts
Para method or the useLinkedAccounts
React hook. This call returns their user ID, their primary identifier (the email or phone number they signed up with), and all accounts they have linked thus far. Optionally, you can also retrieve the full profile metadata for each account:
When fetching linked accounts, you can use the withMetadata
option to include the full profile metadata for each account from a third-party service:
Metadata will only be returned for services that the user authenticated with your app specifically. The particular structure of the metadata will depend on the service in question. A sample response with full metadata included might resemble: