question

Rival Games avatar image
Rival Games asked

Using LoginWithSteam without Steamworks

Hi!

First of all, this is my first question so I want to thank you for providing this awesome platform, loving it up until now. But now to the point.

We have an use-case for PlayFab for multi-platform game that utilizes Steam as one of the authentication choices, but there are some complications that we haven't gotten around.

Setup:

1) For PC, player doesn't need to login as Steam provides the authentication, we only pass the credentials to PlayFab with LoginWithSteam.

2) For Android/iOS, we want to allow logging/linking your Steam account. But doesn't require it, you can also play with Device ID or login with social integrations.

3) Player progress is saved to PlayFab, thus needs to be shared between PC (Steam) and Mobile (non-Steam).

And as using Steamworks requires Steam to be running on the same system, we are evaluating if we could authenticate Steam users through Steam Web API.

This does work to the point that we get authentication details from Steam Web API:

{
  "success": true,
  "requires_twofactor": false,
  "login_complete": true,
  "transfer_urls": [
    "https://store.steampowered.com/login/transfer",
    "https://help.steampowered.com/login/transfer"
  ],
  "transfer_parameters": {
    "steamid": "<REMOVED>",
    "token": "<REMOVED>",
    "auth": "<REMOVED>",
    "remember_login": false,
    "webcookie": "<REMOVED>",
    "token_secure": "<REMOVED>"
  }
}

But seems like PlayFab doesn't work with any of these credentials; which is understandable as the documents that LoginWithSteam requires Steam authentication ticket provided by GetAuthSessionTicket from Steamworks SDK.

So my question is: is there a way to get this outside-of-Steam-platform Steam login to work?

Or should we rely to using some of the returned secrets from the Steam API e.g. auth token as CustomID?

Authentication
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

·
brendan avatar image
brendan answered

Correct, LoginWithSteam is specific to their secure sign-in process and isn't designed to be used with the web sign-in path. Connecting a non-Steam client to an account created with Steam can be done a few ways, with the simplest being to add another login using a social network, like Facebook or Google, and adding a distinct username/password (you may already be using username, so maybe just password) that could be used from another client. Alternately, you could do it with a temporary code by generating a code in the game, linking it to the user account as a Custom ID, displaying it to the user to enter on the other device, then unlinking the Custom ID when they're done. In that case though, you do need to be concerned with making sure to clean up the ID for cases where the client disconnects before the unlink call.

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.