question

scottmacintosh avatar image
scottmacintosh asked

Approach for account linking on website for Twitch drops

The documentation for twitch drops mentions that it requires a website to support linking. Twitch dev documentation specifically says "While account linking can be achieved in-game, we also require that you host a webpage to let Twitch viewers link their accounts. You will need to add this URL to your reward configuration so that Twitch can redirect your viewers to the correct account linking page."

I'm unsure what the best way to go about this would be for a game that's supported on Steam, Xbox, PS4 and Nintendo Switch. How would you advise this?

I've been experimenting with creating a simple website that lets you log in to both Twitch and Steam at the same time, using expressjs, similar to what is described in here and here. This process works fine, but associating the logged in Steam account to its PlayFab account to link Twitch to is proving difficult. PlayFab's LoginWithSteam requires an authentication token obtained from GetAuthSessionTicket that (to my knowledge) isn't available with Steam's web API or most of the common javascript Steamworks wrappers. I do have access to things like steamID, but this isn't enough for logging into PlayFab. I have not yet looked into how to do this process for Xbox / PS4 / Switch but I'd be worried about similar obstacles.

Should I be approaching things differently? Is there a better way to handle Steam logins to PlayFab, or preferably is there a way that the specific details of logging into each platform isn't a concern?

apis
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

·
Rick Chen avatar image
Rick Chen answered

The approach for authentication and account linking depends on the authentication providers. The PlayFab authentication APIs are requiring the parameters that are needed for the authentication providers. Different platforms requires different parameters to authenticate users, and the approach to get the parameters could be different. You could follow this document: Setting up PlayFab authentication using Steam and Unity to get the SteamTicket and use the LinkSteamAccount API to link the steam account. For other platforms, please check the required authentication parameters in the PlayFab authentication API and search in the target platform on How to obtain these authentication parameters.

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.

scottmacintosh avatar image scottmacintosh commented ·

We go through this process in our game, but for the Twitch drops linking website specifically (where we do not have access to the full Steamworks API) no web API or javascript library I'm aware of offers anything like:

HAuthTicket hTicket = SteamUser.GetAuthSessionTicket(ticketBlob, ticketBlob.Length, out ticketSize);

Which is unfortunate, because it seems it's needed to login/link steam accounts.

0 Likes 0 ·
scottmacintosh avatar image scottmacintosh commented ·

I should've been a bit more specific too: given that the Steamworks Web API doesn't provide session tickets but PlayFab requires them, what do you advise we do here?

0 Likes 0 ·
Rick Chen avatar image Rick Chen ♦ scottmacintosh commented ·

As I understand, the AuthSessionTicket can be obtained using the Steamworks API. If the Steamworks API does not support Javascript, could you use another language that the steamwork API supports to build your website? Or as you mentioned, you go through this process in your game, could you advise the user on the website to link their steam account through your game? Please also find the steam’s forum about how to obtain the session ticket on your website.

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.