You can stop reading now if you don’t use Game Center Sign-In with Firebase.
Apple has deprecated the playerID
property of the GKPlayer
object in favour of the new teamPlayerID
and gamePlayerID
properties. These two attributes have been introduced with the goal of increasing player privacy. To learn more about this, watch the Game Center Player Identifiers WWDC session.
Until now, Firebase Authentication has used playerID
as the primary user identifier when users sign in to a game using Game Center Sign-in. This is changing.
To ensure that developers using Firebase Authentication are not affected by this deprecation, we are introducing gamePlayerID
and teamPlayerID
as optional fields to replace playerID
in Firebase Authentication. These new fields, once passed with a valid ID, will be used as the primary user identifier for Game Center Sign-in.
Using the SDK
To utilise these new fields, developers will have to upgrade to the latest version of the Firebase SDK. Once you’ve upgraded to the new version of the SDK, requests will automatically use the new flow, and the user’s identifiers for Game Center will automatically be updated to use the gamePlayerID
.
When retrieving provider-specific information about a user, the federatedId
field of the ProviderUserInfo
will contain the gamePlayerID
instead of the playerID
.
Using the REST API
When using the REST API directly, make sure to include both the playerId
and the new fields (teamPlayerID
and gamePlayerID
) in calls to signInWithGameCenter
. The new fields will be included in the response body, and will be encoded in any ID tokens for the Game Center provider.
Calls that include only the playerId
will not be rejected, but it will not be possible to identify existing users that have already been migrated to the new SDK.
Timeline
Expect the updated client SDKs and updated REST API to be available in early February 2023.
Upgrading the user identifier from the playerID
to the new format is an irreversible process.
The documentation will contain more details once the updated client SDKs are available.