Sign In Register

How can we help you today?

Start a new topic
Answered

How to disable concurrent login

I found this thread, I do as it said by calling Spark.getPlayer().disconnect(true) in AuthenticationResponse, but it doesn't work. No SessionTerminatedMessage sent to either of the devices. I tested sending Spark.message, it was sent only to the one with most recent login, and I'm sure both devices(Mac and PC) are connected to the internet. I'm using Facebook for the authentication. Can someone help me on this?


Best Answer

Hi Nipitpon Wongsuparatkul,


I have set up a test in my own game and this works fine for me - when I get two Test Harness (in the Portal) windows up and log in as the same player on each, the first player receives a SessionTerminatedMessage.

Your own testing suggests that the first (oldest login) player has been disconnected, since only the most recent login receives messages, as you would expect since the first player was logged off.


Could you be ignoring the SessionTerminatedMessage in your client by any chance? Or have this message disabled in your GameSparks game configuration?


Regards,


Jonathan.

1 Comment

Answer

Hi Nipitpon Wongsuparatkul,


I have set up a test in my own game and this works fine for me - when I get two Test Harness (in the Portal) windows up and log in as the same player on each, the first player receives a SessionTerminatedMessage.

Your own testing suggests that the first (oldest login) player has been disconnected, since only the most recent login receives messages, as you would expect since the first player was logged off.


Could you be ignoring the SessionTerminatedMessage in your client by any chance? Or have this message disabled in your GameSparks game configuration?


Regards,


Jonathan.

Login to post a comment