question

Opticgamer avatar image
Opticgamer asked

How to have Steam autolink to playfab account?

Hello I have a system where players can register/login to PlayFab with a username, email, and password but I also use Steam purchases. I've noticed that when ever I enter my shop it creates a Steam account so I always have two accounts. How can I set it up so instead of registering a new account it just links it with the already signed in one instead of creating an account just for Steam?

private void OnGetAuthSessionTicketResponse(GetAuthSessionTicketResponse_t pCallback)

        {

            byte[] tempTicket = new byte[ticketLength];

            for (int i = 0; i < tempTicket.Length; i++)

                tempTicket[i] = ticket[i];



            string hexEncodedTicket = "";

            hexEncodedTicket = System.BitConverter.ToString(tempTicket);

            hexEncodedTicket = hexEncodedTicket.Replace("-", "");

            hexTicket = hexEncodedTicket;



            LoginWithSteam();

        }




public void LoginWithSteam()

        {

            LoginWithSteamRequest request = new LoginWithSteamRequest()

            {

                TitleId = PlayFabSettings.TitleId,

                CreateAccount = false,

                SteamTicket = hexTicket,

                InfoRequestParameters = accountParams

            };



            PlayFabClientAPI.LoginWithSteam(request, OnLoggedIn, OnLoginError);

        }

apisAccount ManagementPartner Add-ons
3 comments
10 |1200

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

scottadams avatar image scottadams commented ·

Duplicate comment (no delete?)

0 Likes 0 ·
scottadams avatar image scottadams commented ·

Do you have the Steam plugin activated in Playfab Game Manger Console?

0 Likes 0 ·
Opticgamer avatar image Opticgamer scottadams commented ·

I got it working by adding a linking api call.

1 Like 1 ·

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

Correct, LinkSteamAccount links the current steam account to your PlayFab account. Next time when logging into PlayFab, you can also choose to use LoginWithSteam to log into the same 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.