question

chris-gong avatar image
chris-gong asked

Login best practices for Desktop platforms

I'm pretty new to Playfab so I apologize if this has already been addressed, but I have recently been reading through the article about recommendations for implementing login. So far it seems that anonymous login with a linked account is the best practice. However, for desktop platforms (Windows, MacOS, Linux, etc.), is anonymous login still recommended? I have found that many mobile games have the option to "Play as Guest" and until now, I didn't know that that option utilized a device ID. I don't see that very often in desktop games, so is there an example of a Windows game that anyone knows about that uses anonymous login?

Also, if anonymous login is recommended for, let's say Windows desktop games, then would a device ID be used with the LoginWithCustomId function? Or would one have to create their own custom service that makes and keeps track of unique user ids? Windows device IDs are subject to change or being leaked so I'd imagine the latter would be preferred. And worst case, would it still be recommended/ok practice to bypass anonymous login and just use one of the "Recoverable Login Mechanisms" as the main login mechanism such as LoginWithPlayfab or LoginWithEmailAddress for instance? It seems to me that most desktop games do this as they normally require login credentials before playing a game unless session data is cached somewhere. And the argument against this is that this authentication approach adds friction to the user experience.

Any help on the subject matter is appreciated and please correct me if I made any mistakes. Thanks in advance!

apisAuthenticationwindowsdocumentation
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

·
Sarah Zhang avatar image
Sarah Zhang answered

>> Also, if anonymous login is recommended for, let's say Windows desktop games, then would a device ID be used with the LoginWithCustomId function? Or would one have to create their own custom service that makes and keeps track of unique user ids? Windows device IDs are subject to change or being leaked so I'd imagine the latter would be preferred.

Yes, your understanding is right. For desktop games, you can use external services to create the CustomIds for players. If you want to implement a “remember me” feature, you can save it in the regedit or other configuration files in encrypted forms. If you don’t need such features, please don’t keep it on the local computer.

In actual development, we would suggest adding a type of recoverable login mechanism for player accounts, at least. The anonymous login mechanism is only an option to enhance the player experience. The anonymous login mechanism is not necessary for every type of game.

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.