question

Trilogic avatar image
Trilogic asked

user already linked to different account

Hi There,
The problem comes when I am trying to register using the different emails from the same PC. After 4-5 successful registration result returns the previous playFab ID, might be due to that it is giving me an error "User already linked to a different account"

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.

Trilogic avatar image Trilogic commented ·
SilentlyAuthenticate ((result) => {

            

            if (result == null) {

                //something went wrong with Silent Authentication, Check the debug console.

                OnPlayFabError.Invoke (new PlayFabError () {

                    Error = PlayFabErrorCode.UnknownError,

                    ErrorMessage = "Silent Authentication by Device failed"

                });

            }



            PlayFabClientAPI.AddUsernamePassword (new AddUsernamePasswordRequest () {

                Username = !string.IsNullOrEmpty (Username) ? Username : result.PlayFabId, //Because it is required & Unique and not supplied by User.

                Email = Email,

                Password = Password,

            }, (addResult) => {

                if (OnLoginSuccess != null) {

                    //call back

                }

            }, (error) => {

                if (OnPlayFabError != null) {

                    //call back

                }

            });



        });
0 Likes 0 ·
Trilogic avatar image Trilogic commented ·


PlayFabClientAPI.LoginWithCustomID (new LoginWithCustomIDRequest () {

            TitleId = PlayFabSettings.TitleId,

            CustomId = SystemInfo.deviceUniqueIdentifier,

            CreateAccount = true,

            InfoRequestParameters = InfoRequestParams

        },

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

Which specific API are you calling that gets that response? If it's the one above - AddUsernamePassword - the issue would be that the Username you are attempting to use is already on another account in your Master Player Account space (Publisher ID based).

22 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.

Trilogic avatar image Trilogic commented ·

You are correct, I am using PlayFabClientAPI.AddUsernamePassword.
And sending the username as result.PlayFabId, I am also tried sending the unique email address as username but that also did not work.

Don't know why SilentlyAuthenticate result is returning some PlayFabID. It happens on some occasions.(After 4-5 consecutive registartions )

0 Likes 0 ·
brendan avatar image brendan Trilogic commented ·

What is the Title ID, what is the PlayFab ID of the user that gets this error, and what are the details of the parameters you're passing into the call (except for the password - no need to post that here).

0 Likes 0 ·
Trilogic avatar image Trilogic commented ·

hi @Brendan Title ID:4DE5 Parameters: Email,Username, password Not any specific user just after 4-5 consecutive registartion it is returing the mentioned error.

Also we're inquiring if you provide database if we were to create a user generated map level editor? Does PlayFab have the capability to support something like that?

0 Likes 0 ·
brendan avatar image brendan Trilogic commented ·

Can you explain in more detail what you mean by "4-5 consecutive registration"? We've been unable to reproduce this error in our own testing.

For User Generated Content, please see this thread: https://community.playfab.com/questions/10054/user-generated-content-upload-with-attributes-sear.html

0 Likes 0 ·
Trilogic avatar image Trilogic brendan commented ·

Registering 4-5 players continuously,(one after other). Sometimes it comes at the first time. Now I have tried to register with email amir0011@gmail.com.It returned playfab ID(9F7D6163D0EE8CB7), which might already exist.
Showing user already linked to a different account.
Don't know why silent authentication is returning existing result.playfabID

Kindly check where is the issue.

 
                   
0 Likes 0 ·
Show more comments
Trilogic avatar image Trilogic commented ·

Hi @Brendan, please see attached screen recording. The player account is not registered in any of our database and yet it is showing that he has an account registered already.

https://drive.google.com/file/d/1YjX7SP6mXFZA-MtQdYApn36EjV1gmQ6W/view

0 Likes 0 ·
brendan avatar image brendan Trilogic commented ·

Oh, I see! Sorry, I was thinking of this the other way around. The problem is that you're trying to call AddUsernamePassword on an account that already has a Username

0 Likes 0 ·
Trilogic avatar image Trilogic brendan commented ·

But the username exists for another account not for the new account that I am adding. By the way, the username is result.PlayFabId, which I suppose to be new every time.If not then can I send my own created username?(May be unique time stamp)

0 Likes 0 ·
Show more comments
Show more comments
Trilogic avatar image Trilogic commented ·

You are correct, username already exists but as such I am not creating any username from my side.
I am sending the result.playfab so when I am calling this authentication why result.playfab ID is returning me the same value.
I am using this method originally provided in the Demo. Alright, I will ignore it but I would definitely like to know what input should I provide from my side as playFab username for new account because I tried sending direct username as

Username ="amir00132018",

Email =Email,

Password =Password,

It also did not work.



SilentlyAuthenticate ((result) => {

            

            if (result == null) {

                //something went wrong with Silent Authentication, Check the debug console.

                OnPlayFabError.Invoke (new PlayFabError () {

                    Error = PlayFabErrorCode.UnknownError,

                    ErrorMessage = "Silent Authentication by Device failed"

                });

            }
0 Likes 0 ·
brendan avatar image brendan Trilogic commented ·

If you mean on a login call, you'll get back a new, unique PlayFab ID if there's no account with matching credentials, and you have CreateAccount set to true. If, however, there's already an account with matching credentials, you'll get that account's PlayFab ID back.

If you're having trouble still, can you please specify what API call you are making (AddUsernamePassword, presumably), what the PlayFab ID of the user is, and include the complete body of the response message.

0 Likes 0 ·
Trilogic avatar image Trilogic brendan commented ·

I have noted a scenario that I would like to share with you when we try to register the new player with AddUsernamePassword API before that it SilentlyAuthenticate player and returns the result. In the result, it returns result.PlayFabId which we use as the username. I think this result.playfabID is the device(PC) oriented.

I have tested the same thing by making a different project and on different PC, in that case, it returns unique playfab ID and successfully registers a new player.

I think this would not be there, its kind of limitation. For instance, let's suppose other player wants to play the game on my PC and when he will register the account. He will face the same issue.(because during new registration device will return ID which is already on the server associated with my account).

The whole code snippet I have mentioned above.


0 Likes 0 ·
Show more comments
Show more comments
Trilogic avatar image Trilogic commented ·

Can you please share the working, code snippet for new account register APIs, which should register multiple account from same machine. It would be of great help.

0 Likes 0 ·
brendan avatar image brendan Trilogic commented ·

What you're describing isn't a simple, short code snippet. What you want to do is have the game have different logins for different people, on the same device. I think what's confusing you is that you appear to be thinking of AddUsernamePassword as a way to add another person to an existing account. That's not what it's for. That API call is used to add a Username, Email Address, and Password to the current user's account. Nothing more.

For what you have in mind, it's more about the user experience and how you guide the user to do the right thing. If you want to have multiple people being able to access the game from a single device, you can certainly use LoginWithCustomID, and what you'll want to do is have a set of game "slots" that you present to the user, with each person represented in a slot. Personally, I'd go with a username/password sign-in system, so that each user can be sure to have secret info about their login, and not let others log into their account.

0 Likes 0 ·
Trilogic avatar image Trilogic brendan commented ·

I got your point, basically, the new user login is dependent on cutomomID.
If I want to sign more player then the custom Id should be unique for each player, I will try to use player email as customID. Is there any API which can be used to check whether the email is already linked to an account or not?

0 Likes 0 ·
Show more comments

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.