Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by Chris Hoefgen · Jan 16, 2018 at 08:44 PM · apisAccount ManagementAuthentication

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.

Comment
Jimmie Tyrrell

People who like this

1 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by 1807605288 · Jan 16, 2018 at 11:30 PM

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.

Comment

People who like this

0 Show 4 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Ben · May 29, 2018 at 09:29 PM 0
Share

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.

avatar image aurecasstudios · May 06, 2019 at 10:42 PM 0
Share

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

avatar image Jimmie Tyrrell · Sep 29, 2020 at 07:42 AM 0
Share

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

avatar image Citrus Yan Jimmie Tyrrell · Oct 13, 2020 at 08:44 AM 0
Share

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

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    6 People are following this question.

    avatar image avatar image avatar image avatar image avatar image avatar image

    Related Questions

    Get Language List fails at Entity Authentication 2 Answers

    Deny CreateAccount in LoginWithCustomIDRequest 1 Answer

    Email registration across different titles 1 Answer

    Best practice for caching a previously authenticated user? 2 Answers

    Server API for AddGenericId and GetPlayFabIDsFromGenericIDs 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges