Jump to content
McKay Development

SteamUser seemlessly not working properly when using refreshToken


Arty
 Share

Recommended Posts

When I log on using a refreshToken, various events quit being emitted (for example "playingState") upon a successful login (loggedOn is emitted just fine)

This way, node-globaloffensive just refuses to work, I moved

user.gamesPlayed([730])

to the loggedOn event callback and yet, the csgo instance wouldn't emit anything (tried connectedToGC, disconnectedFromGC, accountData)

Link to comment
Share on other sites

Work for me :

const SteamUser = require("steam-user");
const GlovalOffensive = require("globaloffensive");

const client = new SteamUser();
const csgo = new GlovalOffensive(client);

client.logOn({
  logonID: 12,
  refreshToken:
    "token",
});

client.on("loggedOn", () => {
  console.log("Logged into Steam");

  client.setPersona(SteamUser.EPersonaState.Online);
  client.gamesPlayed(730);
});

client.on("appLaunched", (appId) => {
  console.log("App launched: " + appId);
});

csgo.on("connectedToGC", () => {
  console.log("Connected to GC");
  console.log("haveGCSession:", csgo.haveGCSession);
});

csgo.on("disconnectedFromGC", (err) => {
  console.log("Disconnected from GC", err);
});

csgo.on("accountData", (data) => {
  console.log("accountData", data);
});

csgo.on("debug", console.log);

 

Link to comment
Share on other sites

21 minutes ago, 4049_1572836826 said:

Work for me :

const SteamUser = require("steam-user");
const GlovalOffensive = require("globaloffensive");

const client = new SteamUser();
const csgo = new GlovalOffensive(client);

client.logOn({
  logonID: 12,
  refreshToken:
    "token",
});

client.on("loggedOn", () => {
  console.log("Logged into Steam");

  client.setPersona(SteamUser.EPersonaState.Online);
  client.gamesPlayed(730);
});

client.on("appLaunched", (appId) => {
  console.log("App launched: " + appId);
});

csgo.on("connectedToGC", () => {
  console.log("Connected to GC");
  console.log("haveGCSession:", csgo.haveGCSession);
});

csgo.on("disconnectedFromGC", (err) => {
  console.log("Disconnected from GC", err);
});

csgo.on("accountData", (data) => {
  console.log("accountData", data);
});

csgo.on("debug", console.log);

 

Odd, I tried using all data directly and worked flawlessly, yet when I'm running inside a worker thread and pass it the data, it refuses to work, going as far as not even returning all data correctly (missing vanity_url etc)

EDIT: Turns out that it might something even more complicated. The login goes through fine, yet the client_supplied_steamid I get is not even a possible ID

Edited by Arty
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...
 Share

×
×
  • Create New...