Sign In Register

How can we help you today?

Start a new topic
Answered

[Unity]Check whether user is authenticated when opening game

Hi guys,


I need to know if the user has been authenticated when opening the game, even with the anonymous device authentication, so I know when to display the login screen. I can't use GS.Authenticated since the connection has to be online in order for it to be true. The only alternative I can find is to check whether GS.GSPlatform.AuthToken is null or not, and this works. My question is, will the AuthToken ever expires or will it always be the same for the user? If yes, then I might face problems in the future and need another workaround.


Thanks :)


Best Answer

If GS.GSPlatform.AuthToken is not empty then the player has logged in at least once.


You could use this while offline, and use GS.Authenticated when online.


Answer

If GS.GSPlatform.AuthToken is not empty then the player has logged in at least once.


You could use this while offline, and use GS.Authenticated when online.

Thank you for the clarification

Login to post a comment