question

icaro avatar image
icaro asked

[BUG] Two Accounts Linked with the Same Facebook

One user was able to link 2 accounts with the same facebook account. Is it right?
I thought that each facebook account should be only linked to one playfab account.

Project ID:2A7D

Account A:5E13033412A60062

Account B:56EE57A9E4ED20

10 |1200

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

brendan avatar image
brendan answered

I do see that the accounts are in this state, but I'm unable to reproduce this in my own testing. Do you have a set of repro steps that demonstrate this? The one way in which I could see it potentially being possible is if you issued multiple login/link calls simultaneously for the same Facebook user, though it looks like account A was already linked at the point account B was created, which should have prevented this.

From my own testing, any attempt to link a new PlayFab ID to a Facebook account that is already in use on another PlayFab ID in the title returns the "LinkedAccountAlreadyClaimed" error. And all calls to LoginWithFacebook, for a Facebook account that is already linked to a PlayFab ID, always returns the correct PlayFab ID, whether or not CreateAccount is set to true.

I can correct this by removing the Facebook info from account B, but I'd appreciate any information you can provide on how these two accounts got into this state, as it looks like you must have hit a very rare corner case.

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

icaro avatar image icaro commented ·

@brendan,
This error is happening with one of my co-workers.

I will share what happen to help you to figure out what is happening.
1-He created his first account(5E13033412A60062) on 3/16/2017

2-I don't know the exact day but in the middle of the last month he linked his facebook to the first account.

3-He cleaned his browser cookies and history, so the game required the login process again.
4-He tried to log in with "LoginWithFacebook" instead of "LoginWithCustomID", and playfab created a new account(56EE57A9E4ED20) instead of return the new account

I'm also unable to reproduce this issue, I tested this flow a lot of times with my account when I was integrating facebook API.

Question:
What does it happen to Playfab when a facebook access token expires?

0 Likes 0 ·
brendan avatar image brendan icaro commented ·

Expiration of the access token has no impact on the account link, since it's a fresh token. What it does mean, is that if you don't sign back in with Facebook, we cannot access their social integration for the account (so, we can't pull the users friend list from Facebook). For login, we take the token, ask Facebook for the user info. That contains a Facebook ID which is specific to the app in question. We check for a matching ID in our data and, if we don't find one, we also check for all business-related IDs for the user (that's Facebook functionality that lets us check for the same user's Facebook IDs in other apps from the same developer). In either case, if we find a match, that's the account we sign the player into.

Without having any kind of repro, I have to assume this was a one-time issue. Obviously, I'd greatly prefer to track down the specifics of how this could have occurred, but from looking at the code, I'm not seeing any way it could be done. If you do find a repro, can you let us know the steps?

0 Likes 0 ·
icaro avatar image icaro commented ·
@Brendan

I have repro steps now :)


I unliked the 56EE57A9E4ED20 account and asked to the user to uninstall the game and execute the login process.
Instead of use the previous linked account, playfab created a new account for the same facebook user.

Here is the new account:
103421B45AFE5065

I think that for some reason Playfab can't detect the previous account "5E13033412A60062".

If you need something to reproduce these steps just ask me.

Repro Step:
+Unlink the newest playfab account(103421B45AFE5065)
+Execute "LoginWithFacebook" with the following facebook id "vicente.vieira.14"

0 Likes 0 ·
brendan avatar image brendan icaro commented ·

When you say you "unlinked" the account, do you literally mean you used UnlinkFacebookAccount? If so, that would mean that the account no longer has any association with the Facebook account at all, and so the player cannot sign into it - any call to login with that Facebook account absolutely would create a new PlayFab account, if CreateAccount is set to true.

Can you confirm that's the call you're making? If so, the issue is with the old account erroneously showing the Facebook link, in which case I can track it down that way.

0 Likes 0 ·
icaro avatar image
icaro answered

@Brendan,

I was talking about this function here:


Just explaining my thought:
When i reported the bug, we had two accounts with the same Facebook id. The user wanted the previous progress in the game, so we unlinked the new account using playfab dashboard and asked the user to restart the game and execute the login flow. Since the first account still is linked with this Facebook id, we expected that the playfab would login with the first account, but playfab created a new account to this user.

So the repro steps that reproduce this issue is:
+Unlink the facebook of the newest account(103421B45AFE5065)
+Execute "LoginWithFacebook" with the following facebook id "vicente.vieira.14"

Expected result:
+Playfab would create a new session with the first created account(5E13033412A60062) thats is the only one linked to this facebook id after we unlink 103421B45AFE5065.


Actual result:
+Playfab is creating a new account to this Facebook id.(So we have 2 accounts linked to same facebook id again)


Is it clear now?


capture.jpg (15.9 KiB)
1 comment
10 |1200

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

brendan avatar image brendan commented ·

Once you unlink the Facebook account, it is not possible for us to find that account using the Facebook user's ID - it has specifically been unlinked, meaning it is no longer associated with that account. So, when you unlink Facebook and then log in using that same Facebook account, we would have no choice but to create a new PlayFab account.

But again, to be clear, you do not have two PlayFab accounts linked to the same Facebook account. The data you are seeing is incorrect. You can test this by signing into the account using the Facebook token for the user multiple times - you will find that it always signs you into the same PlayFab account. If there really were two PlayFab accounts linked, which one you signed into would not be deterministic.

We are working to resolve the issue that makes it appear that you have multiple Facebook accounts linked now.

0 Likes 0 ·
chrissimon avatar image
chrissimon answered

Hi, @Brendan,

I have a similar situation too. Project ID : A0D3
Accounts 1994BC8D861BCB56 and 4DB816A8A061D669 are linked with the same Fb id. Not sure which one is being considered.

,

Hi Brendan,
I have a similar issue too. Project ID : A0D3
Accounts 1994BC8D861BCB56 and 4DB816A8A061D669 are linked using the same FB id. Not sure which one will be considered.

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

chrissimon avatar image chrissimon commented ·

Update : I unlinked the fb id from 1994BC8D861BCB56. and tried logging in. Instead of logging me in to 4DB816A8A061D669, its created a brand new account 68918F5FFAB44CDA. :/

0 Likes 0 ·
chrissimon avatar image chrissimon commented ·

Update : I figured out my issue. I used 2 access tokens. 1 was a generic FB access token. Other was specific to the game. Hence the issue.

0 Likes 0 ·
brendan avatar image brendan chrissimon commented ·

That'd do it - glad to hear you tracked this down!

0 Likes 0 ·
chrissimon avatar image
chrissimon answered

Hey @Brendan,

Ive run into a similar situation regarding 2 playfab accounts being linked with the same fb id on our production environment.

E8663DDB9CFEEC95 and 7A8D2960764ABDC9 was linked with the same fb id on A0D3.
We've unlinked the fb account manually from the console to satisfy the players concerns but I would be grateful if you could shed light on the root cause.

Thank you.

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.