RafGDev Posted July 13, 2016 Report Posted July 13, 2016 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 Quote
Dr. McKay Posted July 13, 2016 Report Posted July 13, 2016 https://github.com/DoctorMcKay/node-steamcommunity/wiki/SteamCommunity#sessionexpired Quote
RafGDev Posted July 13, 2016 Author Report Posted July 13, 2016 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. Quote
Dr. McKay Posted July 13, 2016 Report Posted July 13, 2016 Yeah it only happens when an HTTP request fails. If you aren't making requests then it won't be emitted. Quote
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.