Scope: credentials belong to a player; a player belongs to a game.
The credential types
device_id, email, google, apple, facebook, steam, and discord. A player can hold at
most one of each — linking a second Google account to the same player is rejected rather than
silently replacing the first.
- Unity
Linking lives on the authentication provider, beside the login calls, and every method needs
a signed-in player.There is one method per provider — Credential state is never cached and never queued offline — it is security state, and a stale
answer is worse than no answer. Every call goes to the server.
LinkEmailAsync, LinkDeviceAsync, LinkGoogleAsync,
LinkAppleAsync, LinkFacebookAsync, LinkSteamAsync, LinkDiscordAsync — each taking the
same token your login path already gets from that platform. UnlinkAsync takes a
FlockCredentialProvider instead.Every one of these returns the full, updated credential list, so link and unlink double as
a refresh — you rarely need to call GetLinkedAccountsAsync again straight afterwards.Each PlayerLinkedAccount carries Provider, ProviderUserId, Email, and EmailVerified.Errors worth handling by name:There is no account-merge flow. If a credential already belongs to a different player,
linking fails with
PlayerAccountAlreadyLinked — Flock will not fold two players’ progress
together, because there is no safe general answer to which save wins. Decide in your game
what to offer: keep the current account, or sign out and into the other one.Password resets on a linked email
Once an email is linked, the player has a password they can reset.ResetPasswordAsync (Unreal:
ResetPassword) works signed out, with the email and the code ForgotPasswordAsync sent, so it
does not matter how the player signed in this time.
Account linking is available in both the Unity SDK and the
Unreal SDK.