Jump to content
McKay Development

Dr. McKay

Administrator
  • Posts

    3408
  • Joined

  • Last visited

Posts posted by Dr. McKay

  1. That's an old example. SteamUser.Steam.EFriendRelationship.RequestRecipient should instead be SteamUser.EFriendRelationship.RequestRecipient.

    Regardless, if you want to initiate a friend request, use client.addFriend for that. For example, client.addFriend('76561198398979571')

  2. Given only a steamLoginSecure cookie, no, it's not possible to renew it when it expires. You would need to get the refresh token out of the steamRefresh_steam cookie that's set on login.steampowered.com, and use the steam-session module to exchange it for a new steamLoginSecure cookie.

  3. 23 minutes ago, Caffxine said:

    One is able to choose which platform the tokens are generated for through steam-session? By, "authenticate as a Steam client" do you mean authenticating the client through node-steam-user?

    Yes and yes. Choosing your platform type is done in the LoginSession constructor, which is provided by steam-session.

    23 minutes ago, Caffxine said:

    Just to clarify, node-steam-user imitates a steam client; leveraging the refresh and access tokens exposed through steam-session? So it wouldnt be limited to API requests, but would rather have access to the account similarly to an actual steam client, I assume all actions that require 2fa would still need to be confirmed by the steam guard.

    Correct. It pretends to be a real Steam client, connects to a CM the same way a Steam client does, and sends and receives the same messages a real Steam client does.

  4. 6 hours ago, Caffxine said:

    Just to confirm, the tokens sent by steam are used to get the web session cookies like steamLoginSecure, sessionid, and others?

    Only steamLoginSecure. sessionid is merely a CSRF token and can be any value.

    6 hours ago, Caffxine said:

    Also, one can use these tokens and other account creds for logging into the account with node-steam-user, through this, you can manage/automate an account through node-steam-user without the use of reauthenticating a guard or relogging in for ~200 days?

    Yes. A valid refresh token can be used to authenticate as long as it hasn't expired. It's worth noting that refresh tokens are specific to the platform for which they were generated; only a token generated for EAuthTokenPlatformType.SteamClient can be used to authenticate as a Steam client, and only a token generated for EAuthTokenPlatformType.MobileApp can be used for mobile-app-only requests, such as enabling or disabling 2FA. At present, refresh tokens for all platform types can be used to get web cookies, even though the Steam client doesn't get cookies the same way as the mobile app and web browsers.

    6 hours ago, Caffxine said:

    Are you able to provide anymore detail on how steam-session exposes a users tokens? Or would this be explained in the docs in a way that I may be able to understand.

    It makes the same requests that the official Steam client, mobile app, and web apps use to authenticate users. There's a WebAPI interface for this, although it's not really meant for public consumption the way I'm using it. The Steam client makes the same requests, but they go through a CM (connection manager, the same server all other Steam client communication goes through).

    If you're curious, you could hit F12 to open your browser console, switch to the network tab, then sign into steamcommunity.com. You won't see a tremendous amount of useful info though, since the requests are protobuf-encoded.

  5. It's true that access tokens and refresh tokens are commonly used in OAuth, but this isn't OAuth. It just uses some of the same terminology. And yes, refresh tokens can be used for ~200 days until they expire. Refresh tokens are the tokens used by the Steam client when you select "remember my password", and by the mobile app to keep you logged in. A refresh token also gets set in your browser cookies to renew your web session when necessary.

    There is a mechanism for renewing refresh tokens, which is seemingly used by the Steam client and by the mobile app. I'm working on adding support for refresh token renewal to steam-session.

  6. I'm not really sure what you mean by "extending the session".

    Refresh tokens exist in your browser cookies, encrypted within the config files for the Steam client, and in the Steam mobile app's private files. Otherwise, steam-session is the only way I'm aware of to get a refresh token, although I'm sure there exist other libraries and apps. SteamKit can probably do it in C#, for example.

  7. I've never bothered trying to fully re-create item descriptions using GC data, mostly since there are so many edge cases that it becomes a massive headache. That said, items_game.txt in the game files contains all the data you need to do it (well, that and the localization files to get human-readable strings out of i18n tokens).

×
×
  • Create New...