Jump to content
McKay Development

How to check if we are still logged in on steam or not


Recommended Posts

hey i am facing asame error to waht the antals bot has sometimes after running for a while the steam trade offer manager shows that error: not logged in now my question is is it the steam login that has been expired > if yes then how to check for it that if we are logged in or not because the auto relogin is already enabled by default so it should not cause any problem right but it appearently is

Edited by Dr. McKay
Fixed formatting to make text readable
Link to comment
Share on other sites

So you're using steam-user? You can check if the steamID property is set to a non-null value, which will indicate that you're still logged in.

But from the sound of things, you're running into expired cookies. Your web session cookies expire from time to time and need to be refreshed using steam-user's webLogOn() method.

Link to comment
Share on other sites

where should i place this check?

according to one example i saw from some one waht he did he tried to send a offer when the steam tradeoffer manager returned the error not logged in what he did was 
called this method is this the correct way?
 

    steamReLogin(steam) {
        // If we don't have a steam id at all, we need to re-login, otherwise we can just re-weblogin
        if (!this.clients[steam.accountName].steamID) {
            this.steamLogin(steam);
        }
        else {
            this.clients[steam.accountName].webLogOn();
        }
    }
Link to comment
Share on other sites

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