Arty Posted January 15, 2023 Report Posted January 15, 2023 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) Quote
4049_1572836826 Posted January 15, 2023 Report Posted January 15, 2023 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); Quote
Arty Posted January 15, 2023 Author Report Posted January 15, 2023 (edited) 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 January 15, 2023 by Arty Quote
Dr. McKay Posted January 17, 2023 Report Posted January 17, 2023 It sounds like you're logging in anonymously, which means that you aren't actually passing your refresh token to the logOn method, it's getting null or undefined instead. Quote
Recommended Posts
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.