question

Shiny Seas avatar image
Shiny Seas asked

Trying to log in with CustomID creates two accounts,Log in with CustomID is creating separate accounts

Hi,
I have a log in method where I pass a custom ID:

 GetPlayerCombinedInfoRequestParams parameters = new GetPlayerCombinedInfoRequestParams()
  {
  GetUserAccountInfo = true,
  GetPlayerStatistics = true,
  GetPlayerProfile = true,
  };
  var request = new LoginWithCustomIDRequest
  {
  TitleId = PlayFabSettings.TitleId,
  CustomId = PlayerPrefs.GetString("Account"),
  CreateAccount = true,
  InfoRequestParameters = parameters

  };
  PlayFabClientAPI.LoginWithCustomID(request, OnLoginSuccess, OnLoginFailure);

Thing is, when I log in while in Unity editor, it recognizes the previously logged in Custom ID and logs in with no problem.

When I build and upload to my website, and try to log in with the same CustomID, it creates another different account. (verified by checking player data in the game manager, both accounts have the exact same CustomID linked)

If I try to log in yet again in the browser, it indeed recognizes the account created when first loggin in in the browser.


Player Data
1.jpg (16.8 KiB)
2.jpg (18.8 KiB)
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Made Wang avatar image Made Wang commented ·

I did some tests following the steps you said, but couldn't reproduce your issue.

Can you reproduce this issue? If so, please describe the detailed steps.

Also, can you provide detailed screenshots of both accounts?

0 Likes 0 ·
Shiny Seas avatar image Shiny Seas Made Wang commented ·

@Made Wang after spending a whole day frustrated, I went to sleep. Woke up to the realization (I actually dreamed of this), that I was using two different buttons for logging in to test,one for unity editor where the custom ID was hard coded, and the other one for the webgl build where I took the custom id from a third party. This third party custom id provider, was passing all lower case id, while I was hard coding the real custom ID that has upper and lower case letters, so that is why there were two separate accounts. I added .toLower to my hard coded ID and works perfectly.

0 Likes 0 ·

1 Answer

·
Shiny Seas avatar image
Shiny Seas answered

@Made Wang after spending a whole day frustrated, I went to sleep. Woke up to the realization (I actually dreamed of this), that I was using two different buttons for logging in to test,one for unity editor where the custom ID was hard coded, and the other one for the webgl build where I took the custom id from a third party. This third party custom id provider, was passing all lower case id, while I was hard coding the real custom ID that has upper and lower case letters, so that is why there were two separate accounts. I added .toLower to my hard coded ID and works perfectly.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.