McMuffinDK Posted January 21, 2018 Report Posted January 21, 2018 I got some questions: 1. Should i update the cookies?2. When should i do it?3. How can i do it? Quote
timgfx Posted January 25, 2018 Report Posted January 25, 2018 You can use node-steamcommunity's sessionExpired event to detect when your session expires, which is when you want to refresh/update your cookies. You can do this by calling steam-user's webLogOn method Quote
timgfx Posted January 26, 2018 Report Posted January 26, 2018 Also make sure to provide your steamcommunity instance when creating a new tradeoffermanager instance, this makes tradeoffermanager use steamcommunity’s request instance which will make sessionExpired work with tradeoffermanager too Quote
McMuffinDK Posted February 1, 2018 Author Report Posted February 1, 2018 Thanks for the answer! Can you provide an example for clarification? Quote
Vanilla Posted February 2, 2018 Report Posted February 2, 2018 Thanks for the answer! Can you provide an example for clarification? client.on('webSession', function(sessionID, cookies) { steamcommunity.setCookies(cookies); }); steamcommunity.on("sessionExpired", function(err) { if (err) { client.webLogOn(); } }); 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.