Skip to content

SteamCommunity doesn't set cookies for SteamCommunity.request #332

Description

@literobot

Hello,

I request my badges with:

const SteamUser = require('steam-user'),
Community = require('steamcommunity'),
MyUser = SteamUser(logInfo),
MyCommunity = new Community()
MyUser.on('webSession', (sessionID, cookies) => {
MyCommunity.setCookies(cookies)
})
SomeObject.on('request',function(){
MyCommunity.request("https://steamcommunity.com/my/badges/", function (err, response, body){
console.log(body) //there are my badges, when I request it for first time (after login)
})
})

But after couple of hours, when I request again, it returns a page there are no badges. I think something wrong with setCookie method, probably it sets cookies incorrectly, I don't know why.
Also I tried update cookies with:
MyCommunity.on('sessionExpired', (err) => { MyUser.webLogOn() })
or
setTimeout(()=>{ MyUser.webLogOn() }, coupleHours)
But got same the page with no badges.

node-steamcommunity@3.48.2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions