Persistent User Info from Master to Game Server

Options
Hi,

I have been using Photon for a few years now and am just now upgrading to Photon 4. Currently I am working with the loadbalancing project.

I've integrated a database with my game where users can login. What I want to do is, when a user logs in and creates/joins a room, to keep the users' details persistent across from the Master server to the Game server.

Is there a built in way to do this? Currently I am just in need of an account name which I save on the client on login which I sent to the game server on authentication. However, in future I may want to send more details and it seems advantageous to somehow save the data on the Master server while the client is there, and simply transfer any user details to the Game server when the user transitions.


Thanks in advance!

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @bradleyfshepherd,

    Thank you for choosing Photon!

    In v4, I think you can implement Custom Authentication (return Data and AuthCookie from web service) and make use of the AuthCookie and Data (returned from custom auth.) and Player Properties in GameServer.
  • @JohnTube Thanks for the quick reply!

    Okay, so custom authentication makes sense to me if users are logging in through Facebook or possibly Steam. If I understand correctly, the client would authenticate with the Master server (which could authenticate with a separate website like FB), the server would send the client the AuthCookie/data (including user id or any other user info), and then the client would send that AuthCookie/data to the Game server? Kind of what I am doing now but with an AuthCookie that is more secure than merely sending back a user id?