kat Posted May 17, 2017 Report Posted May 17, 2017 Sorry if this has already been asked before.. ik it can get quite annoying but im running into this issue with my session expiration. I have the following code that I saw someone post to re-login. community.on('sessionExpired', function(err) { if (err) { console.log('sessionExpired: '+err); } console.log("Re-Logging in to Steam..."); community.stopConfirmationChecker(); client.logOn(logOnOptions); }); However when it hit that code it gave the following output.. /home/node_modules/steam-user/components/web.js:9 throw new Error("Cannot log onto steamcommunity.com without first being connected to Steam network"); ^ Error: Cannot log onto steamcommunity.com without first being connected to Steam network Again sorry if this has already been asked..i've been looking around for quite some time now but all I see is.. "You have to just re-login" But just saying that doesn't really help me understand. I'd be greatful for a useful response! Thanks Quote
Dr. McKay Posted May 18, 2017 Report Posted May 18, 2017 None of the code you posted would result in that error. That said, you want to use webLogOn instead of logOn, assuming client is a node-steam-user instance. The web session is distinct from the client session. It connects as a client, then uses that client session to obtain cookies for a web session. The web session expires but the client session doesn't, so webLogOn just gets new cookies using that same client session. 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.