Jump to content


Photo

Sentry file not saved

node.js node-steam-user

  • Please log in to reply
3 replies to this topic

#1 insane

insane

    Newbie

  • Member
  • Pip
  • 2 posts

Posted 16 July 2017 - 08:11 AM

Hey,

 

I'm trying to implement a login process for my bots, but it seems that the sentry files are not stored within the dataDirectory.

 

This is my current code:

this.dataDir = 'data/'
this.client = new Steam.CMClient()

this.user = new SteamUser(this.client, {
  promptSteamGuardCode: false,
  dataDirectory: this.dataDir
})

this.community = new SteamCommunity()

this.user.storage.on('save', (filename, contents, callback) => {
  if (filename.includes('sentry.')) {
    filename = `${this.userName}.sentry`
  }

  fs.writeFile(path.join(this.dataDir, filename), contents, err => {
    if (err) {
      console.error(`Can't write ` + filename + ': ' + err.message)
      return callback(err)
    }

    callback(err)
  })
})

// I implemented the read function respectively

After that I have a couple of other listeners (e.g. webSession).

 

The issue is, only the cellid-x.txt and servers.json are actually created within the data directory, it seems that I'm not able to receive the sentry file no matter what I do.

 

I handle the login via the regular logOn() function.



#2 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,361 posts

Posted 16 July 2017 - 12:39 PM

I don't know offhand why it wouldn't be writing the files at all, but why not just disable the singleSentryFile option to get the behavior you want without implementing your own save handler?



#3 insane

insane

    Newbie

  • Member
  • Pip
  • 2 posts

Posted 16 July 2017 - 12:56 PM

Ok, I commented out the custom save handler, and set the singleSentryFile to false (even though this should be the default option), and it's not storing the sentry files.

 

Do the sentries even matter if I'm using the bots with the mobile authenticator?

 

Thanks



#4 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,361 posts

Posted 16 July 2017 - 01:00 PM

No, the sentries aren't particularly important if you're using 2FA.







Also tagged with one or more of these keywords: node.js, node-steam-user

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users