I am implementing LoginWithFacebook. Is there a way to check if the user has previously logged in with facebook and if so doesn't have to go through the login with facebook window every time they open the app?
I am implementing LoginWithFacebook. Is there a way to check if the user has previously logged in with facebook and if so doesn't have to go through the login with facebook window every time they open the app?
You can do this, but you need to know your player’s playfab ID
https://api.playfab.com/documentation/client/method/GetAccountInfo
the Object returns;
https://api.playfab.com/documentation/Client/datatype/PlayFab.Client.Models/PlayFab.Client.Models.UserAccountInfo it has a Facebook account attribute, which is only set if your players had previously logged in with Facebook and since this is a mobile app, you could do loginwithandroid -> which makes or loads a profile and gets them an auth token -> check for a Facebook account or loginwithIOS
Wait, so what would my auth flow look like? Also, do I just store the Playfab ID in a PlayerPref or something?
I think i know what you are saying, basically I just perform login with IOS device and check if the user is connected to facebook... if not I take them to a page that makes them connect with it. If they are I can just log them in and get their info? What happens if the user decides to sell their device? If another person who bought the device downloads our game and then we log them in with that device id, wouldn't their account be linked to the other persons facebook?
The app "install" itself can make a CustomID too, that’s how other title does it. You install, it makes an install-specific ID, then you log later and associate that with CustomID with your login. So if you reinstall the app, you need to log-in again to re-associate the account but that is it, and you save the ID in the local storage.
Also, it's worth noting that the app will be getting a different ID for the device in the iOS case (since you're not getting the actual device ID, but a generated one that was made when the first of your apps was installed - that's why, if you uninstall all your apps and install a new one, you'll have a new ID).
3 People are following this question.