Argent1028 Posted March 9 Report Share Posted March 9 (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 by Argent1028 Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted March 10 Report Share Posted March 10 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 Link to comment Share on other sites More sharing options...
Argent1028 Posted March 10 Author Report Share Posted March 10 (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 by Argent1028 Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted March 11 Report Share Posted March 11 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 Link to comment Share on other sites More sharing options...
Argent1028 Posted March 11 Author Report Share Posted March 11 (edited) 1 hour ago, 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? 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 by Argent1028 Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted March 12 Report Share Posted March 12 Ah, my bad. The version with proxy support isn't published to npm yet. I'll go ahead and yolo it. Quote Link to comment Share on other sites More sharing options...
Argent1028 Posted March 13 Author Report Share Posted March 13 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 Link to comment Share on other sites More sharing options...
Dr. McKay Posted March 14 Report Share Posted March 14 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 Link to comment Share on other sites More sharing options...
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.