Account Linking
Allow your users to link their external accounts with their Para account
Linking Accounts from the Para Modal
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.
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.
Triggering Account Linking
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.
Account Metadata
To fetch account metadata for a particular user from third-party accounts they have linked through your app - for example, their
Google profile image or their Discord clan information - use the useGetAccountMetadata
React hook or the getAccountMetadata
method. This returns an object,
indexed by the third-party service name, containing the date of the login and the metadata returned from the service at
that time.
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 might resemble: