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
ResetPasswordAsync works for a player who signed in with an email, and also for one who
linked an email during this session.
The SDK learns what’s linked from the credential list, and deliberately doesn’t persist that
across restarts. So after a restored session, call GetLinkedAccountsAsync() once before
offering a password reset — otherwise the SDK doesn’t yet know the player has an email to reset.
Account linking is available in the Unity SDK. Unreal support is not yet
available.