Authentication token expired

Options
Hi. I have updated the server, and after some time of inactivity of the client application started getting the error:
Operation failed: OperationResponse 230: ReturnCode: 32753 (Authentication token expired). Parameters: {} Server: MasterServer
Authentication failed: 'Authentication token expired' Code: 32753

I use a local server - Photon-OnPremise-Server-SDK_v4-0-29-11263.exe

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited March 2016
    Options
    Hi @IgorRazin,

    This is a known issue.

    By design Photon tokens are refreshed on the MasterServer only.

    The refresh happens when switching from MasterServer to GameServer which happens when you create or join a room.

    Token expiration is 1 hour. So if you stay inside a room for more than 1 hour the token expires but you may stay as long as you want on the GameServer without any issues.

    However, you will get the ('Authentication token expired' Code: 32753) error when trying to go back to the MasterServer after leaving the room.

    This will be changed in the future and this issue will be avoided by refreshing tokens on GameServer also. However there is no ETA for this but it's planned. The solution to the issue is to reconnect again to MasterServer.
  • sosh
    sosh
    edited December 2016
    Options
    Hi @JohnTube,

    Our users are encountering this issue on a regular basis.

    - Is there any update or ETA regarding a fix?
    - Is there any way to catch and handle this error situation in application code?
    - Is there a recommended workaround? (e.g. can we easily refresh the master server session?)

    Thank you
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @sosh,

    Please update to PUN v1.80. It has the new AuthEvent implemented:

    Added: The internal "AuthEvent". This event by the server can now update the client's token anytime (before that expires). Good for longer play sessions.
  • sosh
    Options
    @JohnTube Ah that sounds like a good solution - thank you!