So I've implemented logging in with Facebook as well as logging in with Android ID as well as custom ID for iOS and PCs for my Unity game. However as of right now even if you logged in before, I still make the user click to either use Facebook or their Device on each subsequent login/authentication.
What is the best way, or recommended practice, for caching/saving a user's last preferred method of authentication, and auto logging them in next time?
Right now I'm thinking of just using Unity's PlayerPrefs in a manner such as:
1) User enters app. Checks if PlayerPrefs.HasKey("AuthMethod") is true.
2) If false, let user choose a login/authentication method.
3) If they choose Facebook and successfully login, set PlayerPrefs.SetString("AuthMethod", "Facebook") and PlayerPrefs.SetString("Key", "insertAccessTokenFromFacebookHere").
4) If they choose iOS Device and successfully login, set PlayerPrefs.SetString("AuthMethod", "iOS Device") and PlayerPrefs.SetString("Key", "insertCustomIDHereHere").
5) If they choose Android Device and successfully login, set PlayerPrefs.SetString("AuthMethod", "Android Device") and PlayerPrefs.SetString("Key", "insertAndroidIDHereHere").
6) Now the next time they login, PlayerPrefs.HasKey("AuthMethod") should be true. So I'll see what its value is, and log user into that account using the appropriate PlayFab API call for it. If it's successful, user proceeds to app. If it returns an error, the key probably expired (should only happen with the Facebook Access Token in my example, right? Custom/Android ID should never expire), so I'll make them re-choose a login method as if it were their first time in the app.
Is this a good flow? Are people's Custom IDs / Android IDs / Facebook Access Tokens private, as in having them visible could leak personal info? Because I hear PlayerPrefs is saved in a plain text file. I could encrypt values before I save to PlayerPrefs, but I'd prefer to avoid that overhead if IDs and Access Tokens don't leak information.
Or if this is not a good workflow for entry into the app, please give me some ideas! Thank you.