Why photon that's hosted in private sever isn't authenticating users correclty?

Options

Hello, I am using this line to set credentials for photon from unity:

PhotonNetwork.AuthValues = userIsLoggedIn ? new AuthenticationValues(userId) : null;


Even if userIsLoggedIn is true or false, server returns a non-valid user. User id is set to empty string.


It's worth noting that until today, we used photon public cloud, and everything worked fine, but problem exists only on privately hosted server.


What steps I took to try and fix problem:

  • Made sure that I opened all necessary ports on server listed here
  • Made sure to copy-paste correctly server URL in unity photon settings
  • Set port number to 4530 and Protocol to TCP in unity photon settings

Also, I didn't change anything in photon config JSON file.


Thanks for your time!

Answers