question

Talha avatar image
Talha asked

Unlink Android ID thru Cloudscript

Hi,

We are trying to build a mechanism where the user can Unlink his/her AndroidDevice from the account through the cloudscript. I couldnt find anything in the server API apart from UnlinkServerCustomId.


The main issue at hand is that user can click on Unlink Account Button to unlink the device from the playfab account(for whatever reason i.e changing mobiles, selling phone etc). But we want to capture the request and unlink the account after 6 hours through the cloudscript.

If we unlink the account straightaway using Client api, the system is prone to abuse(they can unlink repeatedly and gain the rewards that we give the user at first login).

Account ManagementCloudScript
10 |1200

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

Citrus Yan avatar image
Citrus Yan answered

Currently, PlayFab does not include “Unlink” APIs except UnlinkServerCustomId and UnlinkXboxAccount in the server API set, you can make a feature request about it in here if you find this feature important for your project.

By the way, could you please elaborate on your game’s mechanism of granting rewards to users at first login? Maybe we can find a way to deal with the “abuse” issue.

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

Talha avatar image Talha commented ·

Shizz! that wouldve been a great help.

okay so When the user logs in for the First Time, We grant him X numbers of Boosters (stat),Upgrades(stat), Lives(stat) and Coins(VC).

The way we are dealing with this is

When the Player Logs in we call the getstats function to check his stat value "GameInstalled".

If GameInstalled value = null then we call the cloudscript function where we again check the GameInstalled value if its not 1 then and only then We Set the respective X values and set the GameInstalled Value to "1".

if GameInstalled value = anything but null then we dont grant the initial rewards.

As for the VC is considered they are set in the dashboard (each player get X value of VC on first login and then refresh rate etc is set there).

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Talha commented ·

I don't get why the players can gain rewards repeatedly if they unlink their devices again and again, the stat value "GameInstalled" does not change if the player unlink their devices, right?

0 Likes 0 ·
Talha avatar image Talha Citrus Yan commented ·

If a player logs in with android ID and doesnot link the account to facebook. they can then Play for a while till all the Lives/ Sats are used up then unlink the android device. and when the next time they open the game they'll log in with android ID and an new account will be created and in that new account the Gameinstalled will be null. that's exactly how they will abuse this system.

0 Likes 0 ·
Show more comments
Talha avatar image
Talha answered

Yes, Only when the player Unlinks the account, and logs in again A new account is created. Not every login but on every instance when the player unlinks and logs in again.

How will Google play login and Sign in with Apple ID avoid this situation? Does loging in with GooglePlay and AppleSIgnIn Link the accounts with Playfab account?

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.

Citrus Yan avatar image Citrus Yan commented ·

Google play and Sign in Apple works similar to Facebook login, which is more capable of dealing with this situation. I think the problem you are having is that your game will retrieve another different Android Id when the player logs in after unlinking, looks like the Android Id is not uniquely identifying a device?

0 Likes 0 ·
Talha avatar image Talha Citrus Yan commented ·

what's happening is that when the player unlinks the Android DeviceID "XYZA" from the main playfab account. that deviceID "XYZA" is lost? init? then when the next time the user logs in, a new account is created with deviceID "XYZA" because there is no account with deviceID "XYZA".

its not happening each time the player logs in, but only and only When the user unlinks and relaunches the game A new account is made.

i.e

Player installs game---> PlayFabAccountA created--> Player Plays-->exists the game--->Opens the game again--> he is logged into PlayFabAccountA --> Player Plays till all lives exhausted-->

Player Unlinks AndoirdDevice---> Relaunches the game--->PlayFabAccountB created-->plays again till all lives exhausted again---->Player Unlinks AndoirdDevice---> Relaunches the game--->PlayFabAccountC created-->plays again till all lives exhausted again

and cycle continues.

maybe one way we can reduce the abuse is by checking if there is facebook(our main authentication check) linked with the playfabAccountA, If only linked accounts are android and ios then block the request.(i.e Dont show the Unlink Button, hide it in the UI)

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Talha commented ·

I see, and sorry about my misunderstanding. Yes, you can reduce the abuse by doing that, frankly speaking, the more players got involved in your game (making more processes), the more unlikely that they will create a new account just for free lives.

1 Like 1 ·

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.