Jump to content
McKay Development

Recommended Posts

Posted

Hey,

 

I am wondering what the best way to detect for invalid cookies is. 

 

Detecting Invalid cookies: 

 

In the past I have been using node-steam-tradeoffers so if I sent a tradeoffer that returned status 403, I would get new cookies and then resend the tradeoffer. This is the code that I have at the moment: 

 

client.logOn(logOnOptions);
    client.on("webSession", (sessionID, cookies) => {
      manager.setCookies(cookies, (err) => {
        if (err) {
          console.log(err);
        }
      });
What is the best way to detect and replace invalid cookies?
 
Thanks
 
 
Posted

Does this event only get called when an http request fails? So for example is there a timer to check every hour or so if the session is expired or does it only get called when an http request returns status 403. 

 

Thanks.

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