dario-1 avatar image
dario-1 asked

Best Login practices

I've been reading a lot about best login practices but I don't feel comfortable yet with the whole process.

Let's say this is the login process.

First time

1. User start game

2. The game creates PlayfabAccount with DeviceID

3. The user is authenticated and shows Game UI

4. User links a Facebook account

5. Should we unlink the device? if so, why?

Next Time

1. User logs in with Playfab or Facebook? Here is my biggest concern.

How the recovery process should works? The user has the account linked with Facebook. Let's say he uninstall the game or losses his phone, and later he wants to play again. How do I know if the Facebook account is linked to another playfab account?

Im lost here in the whole process...

Thanks! Any help with be appreciated

Account ManagementAuthentication
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

Seth Du avatar image
Seth Du answered

For the first question – “Should we unlink the device? if so, why?”, there is no need to unlink the device ID. A PlayFab account can be linked to more than one accounts from multiple platforms. For example, when your account is linked to Facebook account, you can still use your device ID for silent login next time. Even though you create an account via LoginWithFacebook and in the player account you can only see Facebook account is linked, you can always manually add custom ID, device ID in Game Manager, or link other accounts to PlayFab accounts via API calls. The work flow at PlayFab is, when you login using device ID/Facebook for the first time and set CreateAccount = true in the request, A PlayFab Account with unique PlayFab ID will be created, then this account will link with your device ID/Facebook.

For the second question, The basic idea for the login part is Facebook accounts, device IDs, google accounts or any other 3rd party accounts that PlayFab supports are just providing different authentication methods here to access the same PlayFab account. when a user’s device is lost, they can still use LoginWithFacebook at a new client, or any other login APIs to access their accounts as long as they still have authentication information.

Additionally, in terms of the linked Facebook account, unless you manually unlink it in Game Manager or client has called APIs like UnlinkFacebookAccount, if another user tries to link it, there should be an error message(in Unity) like:

/Client/LinkFacebookAccount: That account is already linked to a different user

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.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]