question

mulac avatar image
mulac asked

Is it possible to authenticate two users from one device?

In a local 2-player mobile game, the winner needs to have there score incremented on the leaderboard, however, the winner may not be the device owner (person authenticated and logged in).

If they had an option to enter the name of the winner when the game finished, how can we have that amended to a leaderboard?

Player Dataunity3dLeaderboards and StatisticsAuthentication
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

·
Andy avatar image
Andy answered

Yes, that's possible. In order to update the second player's statistics, you'd need them to log in. There are a few options available to support that, so pick the one that makes the most sense.

The pre-built SDKs don't make a local multiplayer scenario trivial, though. By default, subsequent login calls will overwrite your SessionTicket, effectively changing the player context of future client API calls. The SDKs are open source, though, so it should be possible to customize for your scenario.

You can also heavily leverage cloud script in this kind of scenario. Once you know a player's PlayFab id, you can provide that to a cloud script function and have it update that player's record.

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.