How to associate an existing game-center player ID?

Our game is now sign in with game-center. We want to use sign in with apple, but we are worried that players who previously sign in with game-center will not be able to link to their account.

Accepted Reply

On Aug 7, 2019, ShawnZH wrote:


> Our game is now sign in with game-center. We want to use sign in with apple, but we are worried that players who previously sign in with game-center will not be able to link to their account.


There is no relationship between the Sign in with Apple user identifier and the identifier used for Game Center. In order to merge accounts, you can optionally present a dialog for users to link to their existing account after authenticaton with either mechanism.


Prevent Duplicate Accounts


A user may already have an account in your system, but may attempt to use Sign in with Apple to log in to that account. Sharing the real email address that’s associated with the user’s Apple ID may not help, because it may not be the same email used to create the account with your system. There are a couple of ways you can mitigate this issue:


  • Implement the
    ASAuthorizationPasswordProvider
    class to detect and offer keychain credentials that the system already knows about. This works seamlessly to detect and use existing accounts, and prevents new accounts from being created using Sign in with Apple.
  • For new accounts created using Sign in with Apple, let the user know that they have created a new account, and ask if they have any existing accounts to link to.


For more information on preventing duplicate accounts, see here.

Replies

On Aug 7, 2019, ShawnZH wrote:


> Our game is now sign in with game-center. We want to use sign in with apple, but we are worried that players who previously sign in with game-center will not be able to link to their account.


There is no relationship between the Sign in with Apple user identifier and the identifier used for Game Center. In order to merge accounts, you can optionally present a dialog for users to link to their existing account after authenticaton with either mechanism.


Prevent Duplicate Accounts


A user may already have an account in your system, but may attempt to use Sign in with Apple to log in to that account. Sharing the real email address that’s associated with the user’s Apple ID may not help, because it may not be the same email used to create the account with your system. There are a couple of ways you can mitigate this issue:


  • Implement the
    ASAuthorizationPasswordProvider
    class to detect and offer keychain credentials that the system already knows about. This works seamlessly to detect and use existing accounts, and prevents new accounts from being created using Sign in with Apple.
  • For new accounts created using Sign in with Apple, let the user know that they have created a new account, and ask if they have any existing accounts to link to.


For more information on preventing duplicate accounts, see here.