What is needed is that upon calling ‘connect’ in the client I’d want to pass the player identifier as received by my backend (GameSparks in this instance) and ideally a secret or CRC hash with which I can verify the validity of the player id in question.
Then in the creation of the Player entity (or at least in the OnConnected on the worker side) I’d want to receive that player id and secret, and perform a check and load the user data. In this part I should be able to reject the connection if the passed player id and secret do not verify.
My request for custom variables / a dictionary is because I can understand that other people may have different fields that they need for their authentication / player recognition scheme.
Currently, you cannot persist data of a player because you cannot identify a player without an additional command, but first accepting the connection and then receiving a command to load the state may introduce different issues. To do this on connect makes it easier to handle