question

tbrooks27 avatar image
tbrooks27 asked

Getting PlayFab ID on UE4 Game Server.

This may seem really simple but I'm lost on the proper way to do this in UE4 blueprints. My client logs in with customID, retrieves user data, etc. onto their game client and then joins matchmaking. They connect to a server with other players and inherently each player needs to retrieve that same user data on the server, so that they are not passing client (unsecure) data to the server at the beginning of a match. Calling API's like "getuserdata" from the server API on the game server requires a PlayFab ID. I also don't want to pass my client's PlayFab ID to the server to make these calls, because they could pass in a fake PlayFab ID and get someone else's user data.

How can I get and store a client's PlayFab ID on the game server so that I can retrieve each users data with the server API? Do I call loginwithcustomID on the game server for each user? Do I pass the client's original session ticket to the game server and authenticate it?

apisunrealmultiplayer
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

·
Citrus Yan avatar image
Citrus Yan answered

Yes, passing Session ticket and authenticate it using AuthenticateSessionTicket on the server-side is a good practice. In addition, you can also use Entity token for authentications as well and ValidateEntityToken is the API you’d be using. The MasterPlayerAccountId received in the response equals to the PlayFabId you’re looking for: MasterPlayerAccountId

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.