question

brendan avatar image
brendan asked

Reliability of the Player Name in Photon

This is really a Photon question from a developer, but since it was sent to us, we wanted to make sure it was captured in the forums:

I'm signing into Photon using the CustomAuthenticationType.Custom process described in the "Getting started with Photon and Unity" tutorial, but I have a concern around the security of the player name in Photon. Basically, I'm using the Title Display Name from PlayFab as the PhotonNetwork.playerName, but I feel like this isn't protected in any way - that a hacked client could just say whatever it wants to for that value. Am I correct? Is there any way to prevent this?

photon
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

·
brendan avatar image
brendan answered

And here's the answer from the Photon team:

It's a good idea to use the UserID for anything "account"-related, including adding friends (if you do that) and fetching profiles. The NickName is really just that: Some name any user may enter. It does not identify the user. To get anyone's online ID, set the RoomOptions.PublishUserId = true when creating a room. Photon will then publish the userId as set by authentication. When that's done, use the network-object's owner's PhotonPlayer.ID, to know who shot you, etc.

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.