Sign In Register

How can we help you today?

Start a new topic
Answered

Maintaining account access after Facebook revokes access / Token Expires

Hi,


A number of top tier games have the following behavior (Supercell's HayDay, Zynga's Empires & Allies). I am trying to see if we can duplicate this behavior using GameSparks.


1) Player installs app on iPhone for the first time. (Account A)

2) He runs the game and connect to facebook, linking his account in (1) to Facebook

3) He installs the app on Android for the first time (Account B) & tries to connect to Facebook, and is given the option to use either between Account A and Account B).

4) He picks Account A for Android

5) Either his Facebook Token expires, or he revokes Facebook access to our app [Facebook authentication no longer possible]

6) He is still able to continue playing on Account A for both iPhone and Android.


Is the above possible with the current authentication API provided?



Thanks!


Best Answer

After you first connect with Facebook, GameSparks doesn't use Facebook to authenticate the client with the server. It stores its own access token in the client, and uses that to authenticate. So this automatic authentication continues even after the Facebook token expires, just as you want. 


But GameSparks' authentication token can expire (it usually doesn't, but it can), regardless of the Facebook connection status. So if you don't want to force the user to login with a Facebook account in this case, at this point you'll need to fall back on another authentication method.


1 Comment

Answer

After you first connect with Facebook, GameSparks doesn't use Facebook to authenticate the client with the server. It stores its own access token in the client, and uses that to authenticate. So this automatic authentication continues even after the Facebook token expires, just as you want. 


But GameSparks' authentication token can expire (it usually doesn't, but it can), regardless of the Facebook connection status. So if you don't want to force the user to login with a Facebook account in this case, at this point you'll need to fall back on another authentication method.


Login to post a comment