question

andrearossini avatar image
andrearossini asked

Best login logic

Hi,

I was thinking about the best way to do the login in my game. I'm using Unity.

My idea was using Unity's System.uniqueDeviceIdentifier and log in with Custom ID.

I read that not all System.uniqueDeviceIdentifier are safe and so, there are the Android ID (taken using Android API). But I can't know if this is really safe.

Than I found also that System.uniqueDeviceIdentifier isn't always safe even if iOS.

So the question: what do you suggest in order to find an unique Identifier per user?

What is the best way?

Thank you.

Best regards,

Andrea

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

·
brendan avatar image
brendan answered

Honestly, it really depends upon the platform you've chosen. Android devices provide a consistent device identifier, though their access functions make it hard to rely upon that in all circumstances. Meanwhile, on iOS you get a consistent identifier right up to the point where the player uninstalls your apps and re-installs then, in which case they generate a new identifier. It used to be the case that you could work around that by saving an identifier in the Apple KeyChain, but they've since removed that option.

Realistically, you should expect that platforms will always attempt to own the player - this has become a very sensitive issue in the past few years. To some extent, protecting player privacy is a valid reason for this, since everyone should be complying with the best practices concerning personally identifying information (the Right to be Forgotten, for example). But some platforms have chosen to take this far past that point, in an effort to make sure that only they know the actual identity of the player. This is an issue that's going to play out over the next few years, as the industry in general comes up with guidelines that everyone should follow.

In terms of PlayFab, the advice I would provide is that yo should offer anonymous login systems (using the device ID, however temporary), but also provide for "recoverable" login systems, using Facebook, Google, Steam, Twitch, etc., so that they player can always get back to their account.

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.