question

Chris Hoefgen avatar image
Chris Hoefgen asked

Google account IDs don't match

I’m having an issue in our game where the Google linking is not working as expected in our account linking workflow and I am unsure as what is going wrong.

We are using the following:

  • Unity 2017.1.2p3
  • Google Play Game Services Plugin 0.9.41
  • PlayFab Unity SDK 2.32.171106

The game currently has this workflow:

1 - Login to PlayFab with the Device ID

2 - Authenticate with Google Play Games platform

PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().AddOauthScope("profile").RequestServerAuthCode(false).Build();
PlayGamesPlatform.InitializeInstance(config);
PlayGamesPlatform.DebugLogEnabled = true;
PlayGamesPlatform.Activate();

3 - If GooglePlay authenticates successful, look up for existing accounts on that platform:

GetPlayFabIDsFromGoogleIDsRequest request = new GetPlayFabIDsFromGoogleIDsRequest() { 

   GoogleIDs = new List<string>() { Social.localUser.id } 
};
PlayFabClientAPI.GetPlayFabIDsFromGoogleIDs(request, (GetPlayFabIDsFromGoogleIDsResult obj) => { /* evaluate existing links to this ID */ }, (PlayFabError err) => {...});

4 - If no existing link found then prompt the user to link the account and do the following:

GooglePlayGames.PlayGamesPlatform platform = (GooglePlayGames.PlayGamesPlatform)Social.Active;
serverAuthCode = platform.GetServerAuthCode();
LinkGoogleAccountRequest request = new LinkGoogleAccountRequest()
{
  ForceLink = true,
S  erverAuthCode = serverAuthCode
};
PlayFabClientAPI.LinkGoogleAccount(request, HandleAccountLinkSuccess, HandleAccountLinkError);

The Problem

PlayFabClientAPI.LinkGoogleAccount() is returning successful but the link doesn't seem right. First we noticed that PlayFabClientAPI.GetPlayFabIDsFromGoogleIDs() would never actually the PlayFab ID of the player that was linked. I looked up the player in the developer console but there is no Google account visible on the Overview page.

I added a PlayFabClientAPI.GetAccountInfo() call to do some debugging and it seems that the Google ID that is associated with the PlayFab account doesn't actually match the value returned by Social.localUser.id.

When I print out all the data I can see

PlayFab ID = 431FFA7AE5DE41BA

GoogleId linked on PlayFab = 108497095532356099240

Social.localUser.id = g09647207943146822087

I have printed out all the Google user data I have access through the GPGS plugin on the client but nothing seems to match the Google ID PlayFab has linked to the player's account. Where is the value 108497095532356099240 coming from? Does anyone know why it would not match the Google ID I am getting on the client?

I'm not sure what I'm exactly doing wrong as the same workflow works great for GameCenter account linking.

apisAccount ManagementAuthentication
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
1807605288 avatar image
1807605288 answered

Google Account IDs:
This is a new issue that I haven't heard before. I will kick off an investigation, and try to get back to you. In the past, issues with Google sign in have taken a while to resolve, so it could be several weeks or more before we have any kind of answer for you. (sorry)

Game Center:
Please see our Login Best Practices, and scroll to the section near the end:
Insecure Recoverable Login Mechanisms
There are pretty significant restrictions on using GameCenter, and maintaining the security of your players accounts.

4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Ben avatar image Ben commented ·

Were there any updates on this? I was the same team as Chris, but he doesn't work here anymore so I might have missed any follow up.

0 Likes 0 ·
aurecasstudios avatar image aurecasstudios commented ·

Any updates on this? I'm also having the exact same issue here. Already searched everywhere but can't find a solution.

0 Likes 0 ·
Jimmie Tyrrell avatar image Jimmie Tyrrell commented ·

Running into this same exact issue. Anyone find a cause or workaround? Is this expected behavior?

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Jimmie Tyrrell commented ·

This is a expected behavior, Google returns a different ID other than the g*** one from GPG for PlayFab to link to, as discussed in this thread: https://community.playfab.com/questions/11022/google-player-id-problem-and-possible-getplayfabid.html

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.