McMuffinDK Posted January 21, 2018 Report Share 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 Link to comment Share on other sites More sharing options...
timgfx Posted January 25, 2018 Report Share 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 Link to comment Share on other sites More sharing options...
timgfx Posted January 26, 2018 Report Share 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 Link to comment Share on other sites More sharing options...
McMuffinDK Posted February 1, 2018 Author Report Share Posted February 1, 2018 Thanks for the answer! Can you provide an example for clarification? Quote Link to comment Share on other sites More sharing options...
Vanilla Posted February 2, 2018 Report Share 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 Link to comment Share on other sites More sharing options...
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.