Sign In Register

How can we help you today?

Start a new topic
Answered

Session timeout

Hello,


First, sorry if this question is a duplicate, I've been digging the forum for a while and I haven't been able to figure out about this.


I'd like to know if there is a default session timeout. I've seen there is a way to set it manually, but if there is a default value that would be great.


I'm concerned about the fact a player can play in one device and then move to another one after 5 minutes, both logged in with the same account (Game Center or Facebook), causing the save game data is overwritten or something like that.


Regards


Best Answer

Hi Cesar, 


There is no built in timeout I'm afraid, you would have to add this in yourself if you would like this functionality. A user in this post has shared a method which you may find useful. If you are worried about the same player logging in to the same account on different devices you can place Spark.getPlayer().disconnect(true) in the AuthenticationResponse Cloud Code in your game. This will log the current player out on all of the other devices and the latest one will be able to Authenticate and continue on in the game. Let me know if that helps.


Thanks,

Liam


Answer

Hi Cesar, 


There is no built in timeout I'm afraid, you would have to add this in yourself if you would like this functionality. A user in this post has shared a method which you may find useful. If you are worried about the same player logging in to the same account on different devices you can place Spark.getPlayer().disconnect(true) in the AuthenticationResponse Cloud Code in your game. This will log the current player out on all of the other devices and the latest one will be able to Authenticate and continue on in the game. Let me know if that helps.


Thanks,

Liam

Awesome thanks!

Login to post a comment