question

Daniel Kiefer avatar image
Daniel Kiefer asked

Cross Device Sync How To?

Hello, 

so i am pretty new to playfab but i am having a bit of a problem with the cross device setup.

Users like to start playing a game as a guest (LoginWithCustomID) and later they may switch to Facebook (LoginWithFacebook) and back again. 

Now the the Api lets me link a Facebook account, which is ok, but then will only work on that certain device, if a user switches to playing on his iPad i am getting a different CustomID and then i cannot link to Facebook because it is already linked to it.

So i was thinking that the easiest way would be to logout from the CustomID and then do the LoginWithFacebook but unfortunately there is no such thing as a logout in your API.

So am i missing something here or is the API just not build for that kind of thing? Or is there any kind of workaround for that kind of thing?

10 |1200

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

brendan avatar image
brendan answered

Correct, though the normal behavior is to create an account with one of the various login/register methods, then link other authentication systems to it, so that no matter how/where the player signs in, he gets to the same account, with the same data. That way, your save data is as portable as possible, and you can always associate the events/behaviors for a specific user to that one account.

10 |1200

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

Daniel Kiefer avatar image
Daniel Kiefer answered

Ok, so i just checked out that if you did a login with LoginWithCustomID and after that make a call with LoginWithFacebook i get a new Facebook User. And vice versa. this is perfect and even simpler.

 

 

10 |1200

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

Daniel Kiefer avatar image
Daniel Kiefer answered

But then the question is which is the main account.

In my case i make a game which is playable on iOS android and Facebook. So i do LoginWithFacebook and once i got this i link all deviceIDs to this account?

But still what if people want to sign out of Facebook and play in guest mode? Then i need a second type of login, right?

10 |1200

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

brendan avatar image
brendan answered

To be clear, the recommendation is to only have one account. Sign the player in the first time using something like Device ID (if possible), so that it's zero friction (or as close as possible), and then add other authentication mechanisms via the Link... API calls. That way, you can sign into the account using any of those methods, allowing players to sign into their account event if they change devices.

So, to use your example, when the player starts your game, you would check to see if he already has an account by using LoginWithIOSDeviceID, with CreateAccount set to false. If there's no account, ask the player if they want to sign into an account or just start playing. If they want to sign in, offer all the options you have. If they choose to start playing, use LoginWithIOSDeviceID, with CreateAccount set to true to set up the account. Later, incentivize the player to add another login mechanism (free in game VC, etc.), so that you have other ways to sign them in.

We also have a blog post on best practices for login, here: https://playfab.com/blog/first-impressions-count-best-practices-friction-free-player-authentication/.

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.

Steve C avatar image Steve C commented ·

I know this is an old post but this whole process feels flawed.

Lets say I'm a player, I own a Phone and a Tablet. I want to be able to log in to both and get my latest and up to date game state. From what I am reading multiple DeviceID's can not be linked to the same Facebook Login. Is this correct?

And are there any good examples?

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.