How do I authenticate users?

Hi,
I am trying to prototype a game (my client is Unity), and I'm trying to authenticate users. The page on the subject at the main site is confusing at best, so I have no idea how to do it.

What I would kind of expected to happen was that I will be able to send the login information through the InitRequest object, however, I was unable to find any way to control it from the client and enter any information into it.

So, how do I solve this?
Thanks.

Comments

  • Why was my question moved here? I am not using PUN, I am using Photon Server (which is where I placed my question)
  • Hi @shanytopper,

    I think that was a misunderstanding - we thought you are having trouble with authentication on client-side so the question has been moved here. Since you already have read the related documentation page and still have questions, it's best to contact us directly with more detailed questions at developer@photonengine.com. I think a colleague of mine has already given you that information as well.
  • Hi @Christian_Simon,
    I have just send that email a full and detailed description of my current situation. Thank you.
  • I have some questions too about authentication with Photon Server? Seems like the documentation only is covering authentication with cloud setup?
  • DDeathlonger
    edited August 2018
    From my experience, all it takes is setting PhotonNetwork.AuthValues = new AuthenticationValues([any uniquely identifying string]);
    Just remember the auth values are to identify each client as an individual, but I don't believe there's supposed to be any specific rules as to what you use as a string.. Depending on the size of your game, you could do anything from their username (if you disallow same usernames during creation) or an index value if you store player count you can pull the number of players and convert the number of players to a string, or like I do for development, just set it to DateTime.Now.Ticks or something similar.