Jump to content
McKay Development

Recommended Posts

Posted

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

 

Posted

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.

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