I'm having a problem where a player will log in and a new account will be created for them even though their account already exists. Players log in using their deviceUniqueIdentifier so I don't understand why a new account would be generated for them if they already have one. I'm pretty sure using the deviceUniqueIdentifier should mean there would be one account created per device.
This problem results in their leaderboard score showing up twice since both accounts have identical data. I have been manually deleting duplicate accounts thus far, but does anyone know a fix for this?
,I'm having a problem where a player will log in and a new account will be created for them even though their account already exists. Players log in using their deviceUniqueIdentifier so I don't understand why a new account would be generated for them if they already have one.
This results in their leaderboard score showing up twice since both accounts have identical data. I have been manually deleting duplicate accounts thus far, but does anyone know a fix for this?
Answer by Made Wang · May 20 at 08:05 AM
When logging in by device ID, if the device ID already has a linked account, it will log in to this account instead of creating a new one. Can you provide detailed steps to reproduce this issue, such as the code snippet you use to log in? Also, please check if there are some invisible characters in your device ID, such as zero-width spaces.
I've never been able to reproduce the issue myself. My ID doesn't have any invisible characters, just numbers and letters. This is the code used to log in.
var request = new LoginWithCustomIDRequest { CustomId = SystemInfo.deviceUniqueIdentifier, CreateAccount = true }; PlayFabClientAPI.LoginWithCustomID(request, OnLoginSuccess, OnError);
When players log in, their save data is uploaded to the account. So I can tell when two accounts are from the same person becuase their information is identical.
Can you provide your Title Id? And you should check if their device IDs are the same in [Player]->Overview->Identities.
I believe the title id is 75D55. The player IDs of the two accounts are also not the same.
Since you use the deviceUniqueIdentifier as the CustomID to log in, the difference in the CustomID means that the two accounts are from two different devices.
You should check your code and the data that was uploaded. You can call Admin API GetPlayerProfile and GetUserAccountInfo to compare their data.