Jump to content
McKay Development

Recommended Posts

Posted

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

Posted

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

Posted

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();
	}
});

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