Argent1028 Posted March 9, 2023 Report Posted March 9, 2023 (edited) Hi, I have a question about how steam-session works with email guard. I've entered guard code via steam-user, it saved a sentry file. Until I started use steam-session it automatically read info from sentry files. How can I reuse created sentry files in this module to get refreshToken ? Edited March 9, 2023 by Argent1028 Quote
Dr. McKay Posted March 10, 2023 Report Posted March 10, 2023 At the moment, that's not possible if you're using the WebBrowser platform type. But refresh tokens are good for 200 days, so you can just keep using a refresh token until it expires. Quote
Argent1028 Posted March 10, 2023 Author Report Posted March 10, 2023 (edited) Thank you for response. There is an error with httpProxy: // works const session = new LoginSession(EAuthTokenPlatformType.SteamClient) await session.startWithCredentials({ accountName password }) // Uncaught (in promise) TypeError: this._transport.sendRequest is not a function AuthenticationClient.ts:257 const session = new LoginSession(EAuthTokenPlatformType.SteamClient, { httpProxy: proxy }) await session.startWithCredentials({ accountName password }) And one more question. You said that's not possible with WebBrowser, but I use SteamClient type. Can I reuse sentry created by steam-user module to get refreshToken with this type, or maybe steam-session do it automatically like steam-user ? Edited March 10, 2023 by Argent1028 Quote
Dr. McKay Posted March 11, 2023 Report Posted March 11, 2023 let session = new LoginSession(EAuthTokenPlatformType.SteamClient, {httpProxy: 'http://127.0.0.1:8888'}); let startResult = await session.startWithCredentials({ accountName: '...', password: '...', steamGuardCode: generateAuthCode('...') }); Works fine for me. What does your proxy variable look like? Quote
Argent1028 Posted March 11, 2023 Author Report Posted March 11, 2023 (edited) On 3/11/2023 at 10:38 AM, Dr. McKay said: let session = new LoginSession(EAuthTokenPlatformType.SteamClient, {httpProxy: 'http://127.0.0.1:8888'}); let startResult = await session.startWithCredentials({ accountName: '...', password: '...', steamGuardCode: generateAuthCode('...') }); Works fine for me. What does your proxy variable look like? Expand It crashes even with your code because it's a TypeError. const { LoginSession, EAuthTokenPlatformType } = require('steam-session') const session = new LoginSession(EAuthTokenPlatformType.SteamClient, { httpProxy: 'http://127.0.0.1:8888' }) session.startWithCredentials({ accountName: 'accountName', password: 'password' }).then(a => { console.log(a) }) // TypeError: this._transport.sendRequest is not a function I guess this happens because the second parameter in the LoginSession is a transport, but if we pass httpProxy as the second parameter, the transport is undefined, so when it calls this.transport to send the request, it calls undefined because we passed an httpProxy instead of transport, isn't it ? I use 0.0.4-alpha P.S. It looks like the code in your repo is different from the npm package. I built your code from repo it works fine // LoginSession class from npm package constructor(platformType: EAuthTokenPlatformType, transport?: ITransport); // LoginSession class from github repo constructor(platformType: EAuthTokenPlatformType, options?: ConstructorOptions) Edited March 11, 2023 by Argent1028 Quote
Dr. McKay Posted March 12, 2023 Report Posted March 12, 2023 Ah, my bad. The version with proxy support isn't published to npm yet. I'll go ahead and yolo it. Quote
Argent1028 Posted March 13, 2023 Author Report Posted March 13, 2023 Thank you. Do you plan to reuse sentry files from the steam-user so that you don't have to re-enter the guard code from the mail every 200 days to refresh the refreshToken? Quote
Dr. McKay Posted March 14, 2023 Report Posted March 14, 2023 If it's possible, then yeah I'll figure out how to make it happen. As far as I'm aware, right now you can't use a sentry file with the new login system. Quote
Argent1028 Posted March 22, 2023 Author Report Posted March 22, 2023 Hi, thanks for adding the ssfn file provide feature, it works well. Would you like to name ssfn files in steam-user using login instead of steamid64 as before, and read ssfn files in steam-session if they exist, as in the steam-user module ? Quote
Dr. McKay Posted March 23, 2023 Report Posted March 23, 2023 I don't have any plans to directly add automatic sentry file importing to steam-session. Quote
Argent1028 Posted March 26, 2023 Author Report Posted March 26, 2023 Hi there are too many errors happening after you added the timeouts. Authentication.BeginAuthSessionViaCredentials#1 timed out Authentication.GetPasswordRSAPublicKey#1 timed out Perhaps it would be better to increase the timeout to 5-10 seconds, or make this parameter optional ? Quote
Dr. McKay Posted April 15, 2023 Report Posted April 15, 2023 The timeout is now 5 seconds in v1.1.1. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.