Hi,
I am setting up third-party login on PlayFab for an app I am working on. I have included Apple SignIn, Google Play and Facebook as additional login methods, and I was able to login with all of them without problem. I receive the access tokens and I can link the PlayFab account.
Now, the problem is that I would like to test also the error scenarios to make sure that I am handling them properly. Unfortunately I haven't found a proper way to handle, say, expired tokens at login, as I can't find a way to make those tokens expire.
E.g. looks like Facebook tokens last 60 days and even if I change the Data Expiration for test accounts, the token expiration date is still the same.
Note that I will probably use those linked identities to let the players recover their playfab accounts, thus probably using the device Id 99.9% of times to retrieve the PlayFab account. This means that I won't probably use e.g. the FB calls too much...
I understand that this is probably a Facebook question, but I also wonder if anyone else tried to test those failure scenarios via PlayFab, and if so what did they do to handle them: is there a way to force PlayFab calls to fail in debug scenarios?
For example, I guess the LoginWithFacebookAccount will return some kind of token expired error if the token is expired, but what about the PlayFabManager.Instance.UserAccountInfo.FacebookInfo? Would it still be set to something NOT null even if the token expired?
I need a way to know when I have to ask the user to login again in order to refresh the token...
Thanks a lot for your help!