Skip to main content

Linking a cross-platform account

If you've configured your project to optionally allow cross-platform accounts, you'll need to know when to prompt the user to link a cross-platform account and how to kick off the cross-platform linking process.

info

These instructions currently only apply if you're using the default authentication graph and Epic Games cross-platform accounts. Authentication graphs and cross-platform providers can fully customize (or choose not to support) account linking.

Detecting if an account can be linked

To check whether or not you can start the cross-platform account linking process, you need to check the crossPlatform.canLink authentication attribute, like so:

FString CanLink;
if (Account->GetAuthAttribute(TEXT("crossPlatform.canLink"), CanLink) && CanLink == TEXT("true"))
{
// ... display the cross-platform link prompt or button
}

Starting the linking process

To start the link process, call AutoLogin again while the user is signed in. You should use the exact same invocation as described in Login a user.

You'll get the OnLoginComplete event once the linking process is complete.