Jump to content
McKay Development

Recommended Posts

Posted (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 by Argent1028
Posted (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 by Argent1028
Posted
    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?

Posted (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 by Argent1028
Posted

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 ?

 

Posted

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 ?

  • 3 weeks later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...