Login state persist...
 
Notifications
Clear all

Login state persistence

2 Posts
2 Users
0 Reactions
630 Views
(@gecko64)
Posts: 82
Estimable Member
Topic starter
 

How do we know if the user is logged in, as we move from scene to scene in the game? isAuthenticated method seems to return true even if I just started the game. So either it doesn't work the way I'd think, or the authentication somehow lingers after quitting the app...

 
Posted : 11/09/2015 10:47 pm
(@skaredcreations)
Posts: 806
Prominent Member Admin
 

You're right and isAuthenticated is bugged, replace with this (will be added to next update):

public bool isAuthenticated { get { return (localUser != null && localUser.authenticated); } }

About the question of maintaining the user logged between the scene, this is done automatically if you have CombuManager instantiated only once in your game (for example in splash screen if you have or main menu) and the property dontDestroyOnLoad is checked in the inspector because you will have only one instance of CombuManager running in your app.

Thanks

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 11/09/2015 11:02 pm
Share: