question

dbubalo1987 avatar image
dbubalo1987 asked

Automatic login and AddEmailPassword - DeviceID‘s

Hello everyone,

I succesfully integrated additionally „Play as Guest“ by simply signing in the player automatically with his device (anonymous login with ios and android device-id) in my Unity Game. As soon as the player starts the game next time, the last sign-in type (Guest or Registered Player) is saved in player prefs and the player logs in automatically.

I also added the feature that the „Guest“ can register afterwards and turn his account into a „full“ account by adding Username, E-Mail and Password. I don‘t allow Guests to make Real-Money purchases unless they have registered.

But there‘s one thing I didn‘t yet understand. What if an Androidplayer Logs in with his Device-ID, adds an E-Mail + Password, deletes the game from his device and then sells his phone? Let‘s say the other guy who gets the old phone also instals my game and presses „Play as Guest“ - won‘t he then log into the previous phone‘s user‘s account, even if he doesn‘t know his E-Mail and Password, and have also access to purchased items and the full account? How would I avoid that this can happen? Do I need to unlink devices after Email + Password were added and if yes, how do I do this?

Thanks for your help and sorry if I‘m asking dumb questions.

Authentication
10 |1200

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

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

If the account keeps Guest account info, then it can happen. You can use unlink APIs such as Account Management - Unlink Android Device ID - REST API (PlayFab Client) | Microsoft Learn to unlink the device after the players add a recoverable login method. Alternatively, you can provide players with a button to unlink their device when they are no longer playing the game on this phone.

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.