Is it possible to create a new player account with client API AddUsernamePassword if the player has already created an account on this iOS/Android device for the same title before?
Is it necessary to use UnlinkIOSDeviceID/UnlinkAndroidDeviceID on the device before the player can create a second account with client API AddUsernamePassword?
Is it necessary to call LinkIOSDeviceID/LinkAndroidDeviceID immediately after a player has created a new account with client API AddUsernamePassword or is the deviceID automatically linked to this account when I use AddUsernamePassword?
Answer by Citrus Yan · Oct 20, 2020 at 05:54 AM
Client API AddUsernamePassword adds playfab username/password auth to an existing account, it does not create a new player account. Therefore, in your case, have the player log in using its IOS/Android Device Id, then call AddUsernamePassword to add username & password for the account. After that, the player can use both the device id and username/password to log into its account (the same account).
Is it necessary to call LinkIOSDeviceID/LinkAndroidDeviceID after a player has called client API LoginWithPlayFab on a new device? I want that the player can login afterwards with LoginWithIOSDeviceID/LoginWithAndroidDeviceID on his new device. I don't want that the player always needs to use LoginWithPlayFab on his new device.
Is it possible that a certain Android or iOS DeviceID is simultaneously linked to two different player accounts? I think that it is not possible but I just want to be sure.
>>Is it necessary to call LinkIOSDeviceID/LinkAndroidDeviceID after a player has called client API LoginWithPlayFab on a new device?
Sure, you can do that.
>>Is it possible that a certain Android or iOS DeviceID is simultaneously linked to two different player accounts? I think that it is not possible but I just want to be sure.
No, it cannot be linked to multiple accounts.