Best way to maintain persistent player login


#1

I’ve been looking for a way to allow persistent player login. The easiest and, I assume intended way of doing that is to save the Chilliconnect Secret locally and use it to authenticate whenever needed.

However, as far as I can see. The Chilliconnect secret can only be obtained whenever the account is first created. As such, this method doesn’t work if the player logs in to an already created account. The API reference suggests that there is a way to re-obtain the CC Secret after the account is created, but I can’t find a call that returns it aside from “create player”.

Currently, the approach I’m considering is to encrypt credentials locally on the device after initial login and use those credentials to login as long as they’re locally available.

Is there a different intended method for maintaining consistent login on new devices?


#2

Hi Jonas,

The approach outlined in the documentation that we recommend: after you create a Player on ChilliConnect using the CreatePlayer endpoint; you supply the user with the option to link their account with Mobile Device ID, Google, Facebook or one of the more appropriate “Link With…” endpoints that we provide.
A more streamlined approach to this flow is to call one of these methods with the “CreatePlayer” flag set so that it’s one call to ChilliConnect to CreatePlayer and Login all at once. This will allow the user to login with one of these services even on different devices without having to save the Secret.

Alternatively if you still want to use the standalone CreatePlayer method, have the Player supply an e-mail/username and password during creation and require them to enter those credentials in future to login.

Hope this helps.


#3

Thanks for the reply. We have decided to use the mobile device ID to solve our issue.