Jump to content
McKay Development

Recommended Posts

Posted (edited)

Try this for Login

 

let client = new SteamUser(),

manager = new TradeOfferManager({

"steam": client,

"pollInterval": "10000",

"cancelTime": "1800000" // 30m in ms

}),

community = new SteamCommunity();

//Logging in

client.logOn({

accountName: CONFIG.USERNAME,

password: CONFIG.PASSWORD,

twoFactorCode: SteamTotp.getAuthCode(CONFIG.SHAREDSECRET)

});

 

client.on("loggedOn", function() {

client.getPersonas([client.steamID], (personas) => {

console.log("["+getTime()+"] " + " Logged in as " + personas[client.steamID].player_name + " [ " + client.steamID + " ].");

client.setPersona(SteamUser.Steam.EPersonaState.Online);

 

});

});

 

client.on("webSession", (sessionID, cookies) => {

 

manager.setCookies(cookies, (ERR) => {

if (ERR) {

console.log("## An error occurred while setting cookies.");

} else {

console.log("## Websession created and cookies set.");

}

});

Edited by CellSplitter

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