question

jkeon avatar image
jkeon asked

Understanding Devices linked to an account and an edge case with Session Ticket expiry

Hi!

In our game we've identified an edge case that could possibly happen but in testing we haven't been able to get it to happen.

Our game is not server authoritative so we store a local copy of the user's progress locally so they can play offline. If we're online, we'll also sync this data to the server so they can play on different devices and not lose progress if they uninstall.

The edge case is this:

  1. I play on Device A with my Account with PlayFab ID A. Progress is saved locally and also on the server. My Device is Linked to this account.
  2. I then play on Device B and since it's a new device, i had a new account with PlayFab ID B. I go through the menus and opt to login to my Account with PlayFab ID A. Doing so causes us to LoginWithEmail to PlayFab ID A and then call LinkDevice with force link set to true so that Device B is not associated with PlayFab ID A.
  3. I had assumed this meant my Device A was unlinked from PlayFab ID A but maybe that's not the case?
  4. I go back to Device A and launch the game. I would have expected to get a brand new PlayFab ID since the device is no longer linked but instead it just logs me into the PlayFab ID A account.
  5. I then thought this maybe is because the session ticket is still valid?
  6. So i then waited 25 hours so it could expire, yet again i was logged into the PlayFab ID A account.

So potentially our edge case isn't possible depending on how PlayFab works.

Would anyone be able to shed some light on this?

Our thought was that if we log in and get back a PlayFabID that differs from the one that we stored locally. Ex, log in with Device ID and get back PlayFabID of C when our local data on the Device has PlayFab ID of A, we should allow the user to try and login to PlayFab ID A's account explicitly via Email/Facebook etc. But now we're not sure if this is ever possible?

Thanks,

Jon

Account Management
1 comment
10 |1200

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

jkeon avatar image jkeon commented ·

Can't edit my post, but just to correct a typo.

Step 2 - "...then call LinkDevice with force link set to true so that Device B is now associated with PlayFab ID A..."

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

Both devices are linked to the account. The confusion is due to the fact that the Game Manager and user account API queries are only returning the device ID you most recently used to sign in, for the given device ID type. In other words, and using iOS as the device type, you could have your phone and iPad both connected to the account using their iOS device IDs. They'll both sign in fine, but the Game Manager will only show the one you most recently signed in with, and that's the only ID you'll see in the user account info returned to GetAccountInfo (and GetUserAccountInfo, combined info, etc.) queries. The "only the last ID" issue is something we have an open work item on internally, so that we get that fixed in a future update.

10 |1200

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

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.