Hello Everybody!
I am new with PlayFab. I'm testing it for implementing it in a Unity project. I want the app to allow the user to login with Facebook and Google accounts, so a new PlayFab account is created for each new user logged in.
I implemented the Facebook and Google login with Facebook SDK and Google Sign-In Unity Plugin and I managed to do it successfully with both.
To show a bit of the code used I leave this below:
PlayFab LogIn with Facebook
var aToken = Facebook.Unity.AccessToken.CurrentAccessToken; LoginWithFacebookRequest request = new LoginWithFacebookRequest(); request.AccessToken = aToken.TokenString; request.TitleId = PlayFabSettings.TitleId; request.CreateAccount = true; PlayFabClientAPI.LoginWithFacebook(request, OnLoginCallback, OnApiCallError);
PlayFab LogIn with Google
LoginWithGoogleAccountRequest request = new LoginWithGoogleAccountRequest(); request.ServerAuthCode = googleSignInUser.AuthCode; // GoogleSignInUser is the result of a successful google login request.TitleId = PlayFabSettings.TitleId; request.CreateAccount = true; PlayFabClientAPI.LoginWithGoogleAccount(request, OnLoginCallback, OnApiCallError);
But the problem is... When I login to PlayFab in my app, once with Facebook and once again with Google, and i look the PlayFab Console, in the Players section, two different players appear for each login with each account (fb/google).
How can the app to create just one PlayFab player for every user, even if the user login with the two different accounts that have the same email linked?
I hope I have made myself understood.
I appreciate all your help you can give me. Thanks in advance.