Hi,
I have stored some important data in Title Data and I want all of my users to be able to access that data as soon as they open the app even if they are not Logged-in and the chances are they will not be Logged-in.
Can I access it and Is it possible on Playfab?
Answer by Muhammad Roshaan Tariq · Oct 03 at 06:09 AM
@Citrus Yan Well if the players must be logged-in I think a silent login would do the task for me in this matter without my players knowing.
The next question arises is that how will I log them out of the silent login I did in the background? Because I would like them to use the Email/Password login they created. Is there any function to delete their credentials?
It's easy, if you are using Unity SDK, simply call PlayFabClientAPI.ForgetAllCredentials() will do the work. What it does is the following:
public void ForgetAllCredentials() { PlayFabId = null; #if !DISABLE_PLAYFABCLIENT_API ClientSessionTicket = null; #endif #if !DISABLE_PLAYFABENTITY_API EntityToken = null; EntityId = null; EntityType = null; #endif } }
After that, the players won't be able to make the next API calls unless they log in again. If you are using other SDKs, you can first check if they contain this method, or else you can write it manually.
Answer by Citrus Yan · Oct 02 at 09:36 AM
>>Can I access it and Is it possible on Playfab?
No, you cannot access it under normal circumstances since it requires credentials retrieved after a player logs in. You may use Admin/GetTitleData or Server/GetTitleData to access it from the client, however, it’s highly un-recommended since it will expose your secret key to the clients.
Writable Shared Title Data 1 Answer
Non-sharded title data or query of player data? 1 Answer
How to get a list of groups 1 Answer
Data Access of Other Players 1 Answer