Jump to content
McKay Development

steam-session question


Argent1028

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

    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?

Link to comment
Share on other sites

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 by Argent1028
Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

  • 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.

Loading...
×
×
  • Create New...