question

info-20 avatar image
info-20 asked

Logging In and Linking Accounts Cross Platform

Hello,

In our game we want the following flow:

Player boots up game on platfom > Player is logged in anonymously (using specific platform login requests) > Player plays game normally until they get to the UGC portion of the game > Player is prompted to create a PlayFab account and to link the current platform to said PlayFab account > Player can now enter in a Title Display Name if none exists and participate in UGC.

A few questions about this:

  1. Let's say the same user had logged into the game on Steam. I assume that after they create an account with PlayFab, the appropriate call would be to use LinkSteamAccount? and for Xbox the LinkXboxAccount method? Then, at the end of this, I should be able to look at this user in the portal and see both accounts associated with account in the Master Player Account section?
  2. Once the user links their account, they shouldn't need to log in with PlayFab again, correct? I noticed it requires a username and password every time.
  3. Related to the last question, is there a way to grab the master PlayFab account once the platform account is linked to avoid having the user log in with a username and password every time they boot up the game?

Thanks!

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

·
Sarah Zhang avatar image
Sarah Zhang answered

>> 1. Let's say the same user had logged into the game on Steam. I assume that after they create an account with PlayFab, the appropriate call would be to use LinkSteamAccount? and for Xbox the LinkXboxAccount method? Then, at the end of this, I should be able to look at this user in the portal and see both accounts associated with account in the Master Player Account section?

Yes, they are. You can navigate to this doc Setting up PlayFab authentication using Steam and Unity to learn about how to get SteamTicket which should be used in this call. And the XboxToken is provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com/", ""). You can check this API Link Xbox Account for some details.

>> 2. Once the user links their account, they shouldn't need to log in with PlayFab again, correct? I noticed it requires a username and password every time.

Yes, players can login to PlayFab with the third party accounts which linked their PlayFab account.

>> 3. Related to the last question, is there a way to grab the master PlayFab account once the platform account is linked to avoid having the user log in with a username and password every time they boot up the game?

It’s not like grabbing the master PlayFab account. But, yes, it’s possible to login to PlayFab without PlayFab username and password. For example, players can log in to PlayFab via API LoginWithSteam or LoginWithXbox. And such API requires authentication token from third-party platform. So, if you can let clients get such authentication token when users login to the third-party platform, players will be able to use the token to log in to PlayFab silently.

1 comment
10 |1200

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

info-20 avatar image info-20 commented ·

Hi Sarah, and thanks for the answers. This all makes sense but I have one followup to #3:

As I mentioned, what I would ideally like to do with our game is have a register blocked from certain content until they sign up with a PlayFab account, however, I'm still not sure how I can run a check on a user that logs in to see if they have already created a PlayFab account. Do you know what call that would be or where that info would be stored in the api?

Thanks!

0 Likes 0 ·

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.