Jump to content
McKay Development

demonix

Member
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

demonix's Achievements

  1. hello Dr Mckay, thank you for your reply, i'm currently making an apps using reactnative that want to connect to steam by calling an api from the server (ex: the api is '/login') and that after i call that api, it will asking for the steam guard. so going back to reactnative and input the steamguard code and then calling another api from the server (ex: 'verifycode') is this possible? i just want to make sure that the one who use the apps have steam account. best regards, thank you
  2. thank you for your reply dr McKay, so i need to put all my event outside the api? something like this example : var options = { promptSteamGuardCode: false, singleSentryfile: false, autoRelogin: true, dataDirectory: null, } var client = new SteamUser(options); client.on('error', function (err) { switch (err.eresult) { case 5: log('error: invalid password'); case 84: log('error: rate limit exceeded'); case 6: log('error: logged in elsewhere'); default: log('error: ' + err.eresult); } stopClient(steamUsername); }); function stopClient(steamUsername) { if (typeof activeClient !== 'undefined' && activeClient) { //await activeBots[steamUsername].logOff(); // logOff is not async function? activeClient.logOff(); // logout, but if the bot ran into an error its not logged in delete activeClient; // seems to work, but not if it ran into an error log('client stopped', steamUsername); } } router.route('/login').get((req, res) => { client.logOn({ "accountName": config.accountName, "password": config.password }) }) router.route('/verifycode').get((req, res) => { client.on('steamGuard', function(domain, callback) { console.log("Steam Guard code needed from email ending in " + domain); // var code = getCodeSomehow(); var code = "DVWQ4"; var callback = callback(code); res.status(200).json({ success: true, callback }) }); }) if i'm wrong again, could you please explained it in more detail? or is there any exact example that i can take a look? so sorry, because this is still new for me, so its still confusing how it really works. best regards, thanks
  3. Hello, Dr McKay is this a correct way to do this ? var options = { promptSteamGuardCode: false, singleSentryfile: false, autoRelogin: true, dataDirectory: null, } var client = new SteamUser(options); router.route('/login').get((req, res) => { client.logOn({ "accountName": config.accountName, "password": config.password }) client.on('error', function (err) { switch (err.eresult) { case 5: log('error: invalid password'); case 84: log('error: rate limit exceeded'); case 6: log('error: logged in elsewhere'); default: log('error: ' + err.eresult); } stopClient(steamUsername); }); function stopClient(steamUsername) { if (typeof activeClient !== 'undefined' && activeClient) { //await activeBots[steamUsername].logOff(); // logOff is not async function? activeClient.logOff(); // logout, but if the bot ran into an error its not logged in delete activeClient; // seems to work, but not if it ran into an error log('client stopped', steamUsername); } } }) router.route('/verifycode').get((req, res) => { client.on('steamGuard', function(domain, callback) { console.log("Steam Guard code needed from email ending in " + domain); // var code = getCodeSomehow(); var code = "55X4B"; callback(code); }); }) router.route('/logout').get((req, res) => { SteamUser.logOff(); }) best regards, thanks
  4. thank you dr Mckay for your reply, this is still new for me, so i still dont know where to start, best regards, thanks
  5. Hello everyone, before i make this topic, i already search and read some of the topic in this forum/issue in github, but i still dont understand what should i do, or maybe i'm doing it wrong. i'm trying to make an API login in nodejs for user (not bot) and input steamguard(one time/at first time), but i want to make it separately. for example : 1. user input username and password in form -> next/submit 2. user input steamguard in form 3. after that user will keep autologin. i've tried this : router.route('/login').get((req, res) => { var client = new SteamUser({ autoRelogin: true, promptSteamGuardCode: false }); client.logOn({ "accountName": config.accountName, "password": config.password }) }) and now i got this : router.route('/verify').get((req, res) => { var client = new SteamUser({ autoRelogin: true, promptSteamGuardCode: false }); client.logOn({ "accountName": config.accountName, "password": config.password, "twoFactorCode": "GGVGD", ////////////// How can I input this code separately in other form? "rememberPassword": true }) client.on('loggedOn', function (details) { console.log("Logged into Steam as " + client.steamID.getSteam3RenderedID()); client.setPersona(SteamUser.EPersonaState.Online); client.gamesPlayed(440); }); }) but i dont understand how can user properly input steamguard separately after they input username and password, is what i'm doing already correct? forgive me if my topic is duplicate or if its a stupid questions. thanks
×
×
  • Create New...