Is custom authentication reusable?

Options

Lets say a user authenticates using custom authentication, and then connects to photon.

Then the user disconnects, but still has the authentication parameters set from the previous connection.

Does he have to perform the custom authentication again? Which takes a few moments, or can he connect directly with the previous token? Or does it depend on the authentication service, in my case it's PlayFab.

Best Answer

  • Meep
    Meep ✭✭✭
    Answer ✓
    Options

    Hi, this widely depends on service but you should be able to reconnect again with your parameters yes.

    You should not need to work with Photon tokens since Realtime/PUN does a good job of automating things like reconnection. But if you do, know that Photon tokens do not give you access to all clusters, but simply a specific path. For example; if you authenticate to the region EU, you will receive a token which allows you to access EU for one hour. But you cannot take this token and use it for a different region. The same concept applies to the GameServer nodes as the GameServer will reject you if you connect with a token which was targeting a different node.

Answers

  • Meep
    Meep ✭✭✭
    Answer ✓
    Options

    Hi, this widely depends on service but you should be able to reconnect again with your parameters yes.

    You should not need to work with Photon tokens since Realtime/PUN does a good job of automating things like reconnection. But if you do, know that Photon tokens do not give you access to all clusters, but simply a specific path. For example; if you authenticate to the region EU, you will receive a token which allows you to access EU for one hour. But you cannot take this token and use it for a different region. The same concept applies to the GameServer nodes as the GameServer will reject you if you connect with a token which was targeting a different node.